Lines Matching +full:0 +full:x4c
29 …{ 0x98, 0xC2, 0x00, 4, 0x40, 1, 1024, 0x00, 18, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
31 …{ 0x98, 0xCB, 0x00, 4, 0x40, 2, 1024, 0x00, 19, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
33 …{ 0x98, 0xED, 0x00, 8, 0x40, 1, 2048, 0x0C, 20, 0x8, 0, { 0x04, 0x0C, 0x08, 0x10 }, &sfc_nand_get_…
35 …{ 0x98, 0xEB, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
37 …{ 0x98, 0xE2, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
40 …{ 0xC2, 0x12, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
42 …{ 0xC2, 0x22, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
44 …{ 0xC2, 0x26, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
46 …{ 0xC2, 0x37, 0x00, 8, 0x40, 1, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
48 …{ 0xC2, 0x92, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
50 …{ 0xC2, 0xA2, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
52 …{ 0xC2, 0x96, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
54 …{ 0xC2, 0xA6, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
56 …{ 0xC2, 0xB7, 0x00, 8, 0x40, 1, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
59 …{ 0xC8, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
61 …{ 0xC8, 0xD1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
63 …{ 0xC8, 0xD2, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
65 …{ 0xC8, 0x51, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
67 …{ 0xC8, 0x52, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
69 …{ 0xC8, 0xC1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
71 …{ 0xC8, 0x45, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
73 …{ 0xC8, 0x55, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
75 …{ 0xC8, 0xD9, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
77 …{ 0xC8, 0x41, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
79 …{ 0xC8, 0x42, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
81 …{ 0xC8, 0x82, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
83 …{ 0xC8, 0x92, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
85 …{ 0xC8, 0x91, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
87 …{ 0xC8, 0xF4, 0x00, 4, 0x40, 2, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
90 …{ 0xEF, 0xAA, 0x21, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
92 …{ 0xEF, 0xAA, 0x22, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
94 …{ 0xEF, 0xAA, 0x23, 4, 0x40, 1, 4096, 0x4C, 20, 0x8, 0, { 0x04, 0x14, 0x24, 0x34 }, &sfc_nand_get_…
96 …{ 0xEF, 0xBA, 0x21, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
98 …{ 0xEF, 0xBA, 0x22, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
100 …{ 0xEF, 0xAA, 0x20, 4, 0x40, 1, 512, 0x4C, 17, 0x1, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_e…
102 …{ 0xEF, 0xAE, 0x21, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 0, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
105 …{ 0xC9, 0x52, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0xE, 1, { 0x04, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
107 …{ 0xC9, 0x21, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
109 …{ 0xC9, 0xA1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
111 …{ 0xC9, 0x22, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
113 …{ 0xC9, 0x5A, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0xE, 1, { 0x04, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
115 …{ 0xC9, 0xD4, 0x00, 8, 0x40, 1, 2048, 0x4C, 20, 0x4, 1, { 0x20, 0x40, 0x24, 0x44 }, &sfc_nand_get_…
118 …{ 0xCD, 0xB1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x10, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
120 …{ 0xCD, 0xA2, 0x00, 4, 0x40, 1, 2048, 0x00, 19, 0x4, 0, { 0x10, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
122 …{ 0xCD, 0xEA, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
124 …{ 0xCD, 0xEB, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
126 …{ 0xCD, 0xEC, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
128 …{ 0xCD, 0x71, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
130 …{ 0xCD, 0x72, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
132 …{ 0xCD, 0x70, 0x00, 4, 0x40, 1, 512, 0x4C, 17, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_e…
134 …{ 0xCD, 0x60, 0x00, 4, 0x40, 1, 512, 0x4C, 17, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_e…
137 …{ 0xE5, 0x71, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
139 …{ 0xE5, 0x72, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
141 …{ 0xE5, 0x21, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
143 …{ 0xE5, 0x22, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
145 …{ 0xE5, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
147 …{ 0xE5, 0xF2, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
149 …{ 0xE5, 0xF4, 0x00, 4, 0x40, 2, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
151 …{ 0xE5, 0xA1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
154 …{ 0xD5, 0x22, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
156 …{ 0xD5, 0x20, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
158 …{ 0xD5, 0x03, 0x00, 8, 0x40, 1, 2048, 0x4C, 20, 0x8, 1, { 0x04, 0x28, 0x08, 0x2C }, &sfc_nand_get_…
160 …{ 0xD5, 0x25, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
163 …{ 0x0B, 0xE2, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
165 …{ 0x0B, 0xE1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
167 …{ 0x0B, 0xE3, 0x00, 4, 0x80, 1, 2048, 0x4C, 20, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
169 …{ 0x0B, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
171 …{ 0x0B, 0xF2, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
173 …{ 0x0B, 0x11, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
175 …{ 0x0B, 0x12, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
177 …{ 0x0B, 0x13, 0x00, 8, 0x40, 1, 2048, 0x4C, 20, 0x8, 1, { 0x04, 0x08, 0x0C, 0x10 }, &sfc_nand_get_…
179 …{ 0x0B, 0x15, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
182 …{ 0x2C, 0x24, 0x00, 4, 0x40, 2, 1024, 0x4C, 19, 0x8, 0, { 0x20, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
184 …{ 0x2C, 0x14, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 0, { 0x20, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
187 …{ 0xA1, 0xA1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x00, 0x04, 0xFF, 0xFF }, &sfc_nand_get_…
189 …{ 0xA1, 0xE4, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
191 …{ 0xA1, 0xE5, 0x00, 4, 0x40, 2, 1024, 0x4C, 19, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
193 …{ 0xA1, 0xA5, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
196 …{ 0xC8, 0x21, 0x00, 4, 0x40, 1, 1024, 0x00, 18, 0x1, 0, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
198 …{ 0xC8, 0x01, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x14, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
200 …{ 0x9B, 0x12, 0x00, 4, 0x40, 1, 1024, 0x40, 18, 0x1, 1, { 0x14, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
202 …{ 0xBC, 0xB3, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 1, { 0x04, 0x10, 0xFF, 0xFF }, &sfc_nand_get_…
204 …{ 0xBF, 0x21, 0x00, 4, 0x40, 1, 1024, 0x40, 18, 0x4, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
206 …{ 0xEA, 0xC1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
208 …{ 0xA1, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
210 …{ 0x01, 0x25, 0x00, 4, 0x40, 2, 1024, 0x4C, 19, 0x4, 1, { 0x04, 0x08, 0x0C, 0x10 }, &sfc_nand_get_…
212 …{ 0x01, 0x35, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 1, { 0x04, 0x08, 0x0C, 0x10 }, &sfc_nand_get_…
223 for (i = 0; i < ARRAY_SIZE(spi_nand_tbl); i++) { in sfc_nand_get_info()
224 if (spi_nand_tbl[i].id0 == nand_id[0] && in sfc_nand_get_info()
242 op.sfcmd.d32 = 0; in sfc_nand_write_en()
245 op.sfctrl.d32 = 0; in sfc_nand_write_en()
247 ret = sfc_request(&op, 0, NULL, 0); in sfc_nand_write_en()
256 op.sfcmd.d32 = 0; in sfc_nand_rw_preset()
257 op.sfcmd.b.cmd = 0xff; in sfc_nand_rw_preset()
260 op.sfctrl.d32 = 0; in sfc_nand_rw_preset()
265 ret = sfc_request(&op, 0, NULL, 0); in sfc_nand_rw_preset()
274 op.sfcmd.d32 = 0; in sfc_nand_read_feature()
275 op.sfcmd.b.cmd = 0x0F; in sfc_nand_read_feature()
278 op.sfctrl.d32 = 0; in sfc_nand_read_feature()
281 *data = 0; in sfc_nand_read_feature()
298 op.sfcmd.d32 = 0; in sfc_nand_write_feature()
299 op.sfcmd.b.cmd = 0x1F; in sfc_nand_write_feature()
303 op.sfctrl.d32 = 0; in sfc_nand_write_feature()
320 *data = 0; in sfc_nand_wait_busy()
322 for (i = 0; i < timeout; i++) { in sfc_nand_wait_busy()
323 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_wait_busy()
330 if (!(status & (1 << 0))) in sfc_nand_wait_busy()
341 * ecc bits: 0xC0[4,5]
342 * 0b00, No bit errors were detected
343 * 0b01, Bit errors were detected and corrected.
344 * 0b10, Multiple bit errors were detected and not corrected.
345 * 0b11, Bits errors were detected and corrected, bit error count
356 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status0()
357 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status0()
362 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status0()
368 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status0()
382 * ecc bits: 0xC0[4,5]
383 * 0b00, No bit errors were detected;
384 * 0b01, Bits errors were detected and corrected, bit error count
386 * 0b10, Multiple bit errors were detected and not corrected;
387 * 0b11, Reserved.
397 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status1()
398 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status1()
403 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status1()
409 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status1()
411 if (ecc == 0) in sfc_nand_get_ecc_status1()
423 * ecc bits: 0xC0[4,5] 0xF0[4,5]
424 * [0b0000, 0b0011], No bit errors were detected;
425 * [0b0100, 0b0111], Bit errors were detected and corrected. Not
427 * [0b1000, 0b1011], Multiple bit errors were detected and
429 * [0b1100, 0b1111], reserved.
439 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status2()
440 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status2()
445 ret = sfc_nand_read_feature(0xF0, &status1); in sfc_nand_get_ecc_status2()
450 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status2()
456 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status2()
457 ecc = (ecc << 2) | ((status1 >> 4) & 0x03); in sfc_nand_get_ecc_status2()
471 * ecc bits: 0xC0[4,5] 0xF0[4,5]
472 * [0b0000, 0b0011], No bit errors were detected;
473 * [0b0100, 0b0111], Bit errors were detected and corrected. Not
475 * [0b1000, 0b1011], Multiple bit errors were detected and
477 * [0b1100, 0b1111], Bit error count equals the bit flip
488 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status3()
489 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status3()
494 ret = sfc_nand_read_feature(0xF0, &status1); in sfc_nand_get_ecc_status3()
499 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status3()
505 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status3()
506 ecc = (ecc << 2) | ((status1 >> 4) & 0x03); in sfc_nand_get_ecc_status3()
520 * ecc bits: 0xC0[2,5]
521 * [0b0000], No bit errors were detected;
522 * [0b0001, 0b0111], Bit errors were detected and corrected. Not
524 * [0b1000], Multiple bit errors were detected and
526 * [0b1100], Bit error count equals the bit flip
538 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status4()
539 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status4()
544 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status4()
550 ecc = (status >> 2) & 0x0f; in sfc_nand_get_ecc_status4()
564 * ecc bits: 0xC0[4,6]
565 * [0b000], No bit errors were detected;
566 * [0b001, 0b011], Bit errors were detected and corrected. Not
568 * [0b100], Bit error count equals the bit flip
570 * [0b101, 0b110], Reserved;
571 * [0b111], Multiple bit errors were detected and
582 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status5()
583 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status5()
588 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status5()
594 ecc = (status >> 4) & 0x07; in sfc_nand_get_ecc_status5()
608 * ecc bits: 0xC0[4,6]
609 * [0b000], No bit errors were detected;
610 * [0b001], 1-3 Bit errors were detected and corrected. Not
612 * [0b010], Multiple bit errors were detected and
614 * [0b011], 4-6 Bit errors were detected and corrected. Not
616 * [0b101], Bit error count equals the bit flip
628 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status6()
629 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status6()
634 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status6()
640 ecc = (status >> 4) & 0x07; in sfc_nand_get_ecc_status6()
642 if (ecc == 0 || ecc == 1 || ecc == 3) in sfc_nand_get_ecc_status6()
654 * ecc bits: 0xC0[4,7]
655 * [0b0000], No bit errors were detected;
656 * [0b0001, 0b0111], 1-7 Bit errors were detected and corrected. Not
658 * [0b1000], 8 Bit errors were detected and corrected. Bit error count
660 * [0b1111], Bit errors greater than ECC capability(8 bits) and not corrected;
671 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status7()
672 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status7()
677 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status7()
683 ecc = (status >> 4) & 0xf; in sfc_nand_get_ecc_status7()
697 * ecc bits: 0xC0[4,6]
698 * [0b000], No bit errors were detected;
699 * [0b001, 0b011], 1~3 Bit errors were detected and corrected. Not
701 * [0b100], Bit error count equals the bit flip
713 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status8()
714 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status8()
719 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status8()
725 ecc = (status >> 4) & 0x07; in sfc_nand_get_ecc_status8()
739 * ecc bits: 0xC0[4,5]
740 * 0b00, No bit errors were detected
741 * 0b01, 1-2Bit errors were detected and corrected.
742 * 0b10, 3-4Bit errors were detected and corrected.
743 * 0b11, 11 can be used as uncorrectable
753 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status9()
754 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status9()
759 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status9()
765 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status9()
784 op.sfcmd.d32 = 0; in sfc_nand_erase_block()
785 op.sfcmd.b.cmd = 0xd8; in sfc_nand_erase_block()
789 op.sfctrl.d32 = 0; in sfc_nand_erase_block()
792 ret = sfc_request(&op, addr, NULL, 0); in sfc_nand_erase_block()
811 op.sfcmd.d32 = 0; in sfc_nand_read_cache()
816 op.sfctrl.d32 = 0; in sfc_nand_read_cache()
820 plane = p_nand_info->plane_per_die == 2 ? ((row >> 6) & 0x1) << 12 : 0; in sfc_nand_read_cache()
838 rkflash_print_dio("%s %x %x\n", __func__, addr, p_page_buf[0]); in sfc_nand_prog_page_raw()
846 op.sfcmd.d32 = 0; in sfc_nand_prog_page_raw()
851 op.sfctrl.d32 = 0; in sfc_nand_prog_page_raw()
854 plane = p_nand_info->plane_per_die == 2 ? ((addr >> 6) & 0x1) << 12 : 0; in sfc_nand_prog_page_raw()
864 sfc_nand_read_cache(addr, (u32 *)sfc_nand_dev.recheck_buffer, 0, data_area_size); in sfc_nand_prog_page_raw()
872 op.sfcmd.d32 = 0; in sfc_nand_prog_page_raw()
873 op.sfcmd.b.cmd = 0x10; in sfc_nand_prog_page_raw()
877 op.sfctrl.d32 = 0; in sfc_nand_prog_page_raw()
878 ret = sfc_request(&op, addr, p_page_buf, 0); in sfc_nand_prog_page_raw()
898 memset(&gp_page_buf[data_size / 4], 0xff, sec_per_page * 16); in sfc_nand_prog_page()
899 gp_page_buf[(data_size + meta->off0) / 4] = p_spare[0]; in sfc_nand_prog_page()
920 op.sfcmd.d32 = 0; in sfc_nand_read()
921 op.sfcmd.b.cmd = 0x13; in sfc_nand_read()
925 op.sfctrl.d32 = 0; in sfc_nand_read()
927 sfc_request(&op, row, p_page_buf, 0); in sfc_nand_read()
937 op.sfcmd.d32 = 0; in sfc_nand_read()
942 op.sfctrl.d32 = 0; in sfc_nand_read()
946 plane = p_nand_info->plane_per_die == 2 ? ((row >> 6) & 0x1) << 12 : 0; in sfc_nand_read()
948 rkflash_print_dio("%s %x %x\n", __func__, row, p_page_buf[0]); in sfc_nand_read()
960 return sfc_nand_read(addr, p_page_buf, 0, page_size); in sfc_nand_read_page_raw()
969 int retries = 0; in sfc_nand_read_page()
974 p_spare[0] = gp_page_buf[(data_size + meta->off0) / 4]; in sfc_nand_read_page()
986 rkflash_print_error("%s[0x%x], ret=0x%x\n", __func__, addr, ret); in sfc_nand_read_page()
1006 u32 marker = 0; in sfc_nand_check_bad_block()
1011 if (ret == SFC_NAND_ECC_ERROR || (u16)marker != 0xffff) in sfc_nand_check_bad_block()
1016 if ((u16)marker != 0xffff) in sfc_nand_check_bad_block()
1032 gp_page_buf[data_size / 4] = 0x0; in sfc_nand_mark_bad_block()
1046 op.sfcmd.d32 = 0; in sfc_nand_read_id()
1050 op.sfctrl.d32 = 0; in sfc_nand_read_id()
1053 ret = sfc_request(&op, 0, data, 3); in sfc_nand_read_id()
1071 bad_cnt = 0; in sfc_nand_get_bad_block_list()
1075 for (blk = 0; blk < blk_per_die; blk++) { in sfc_nand_get_bad_block_list()
1120 ret = sfc_nand_read_feature(0xB0, &status); in sfc_nand_enable_QE()
1130 return sfc_nand_write_feature(0xB0, status); in sfc_nand_enable_QE()
1139 id_byte[0], id_byte[1], id_byte[2]); in sfc_nand_init()
1141 if (id_byte[0] == 0xFF || id_byte[0] == 0x00) in sfc_nand_init()
1157 sfc_nand_dev.manufacturer = id_byte[0]; in sfc_nand_init()
1164 sfc_nand_write_feature(0xA0, 0); in sfc_nand_init()
1167 sfc_nand_dev.page_read_cmd = 0x03; in sfc_nand_init()
1168 sfc_nand_dev.page_prog_cmd = 0x02; in sfc_nand_init()
1180 sfc_nand_dev.page_read_cmd = 0x6b; in sfc_nand_init()
1187 sfc_nand_dev.page_prog_cmd = 0x32; in sfc_nand_init()
1190 sfc_nand_read_feature(0xA0, &status); in sfc_nand_init()
1191 rkflash_print_info("sfc_nand A0 = 0x%x\n", status); in sfc_nand_init()
1192 sfc_nand_read_feature(0xB0, &status); in sfc_nand_init()
1193 rkflash_print_info("sfc_nand B0 = 0x%x\n", status); in sfc_nand_init()