Lines Matching +full:0 +full:x4c
30 …{ 0x98, 0xC2, 0x00, 4, 0x40, 1, 1024, 0x00, 18, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
32 …{ 0x98, 0xCB, 0x00, 4, 0x40, 2, 1024, 0x00, 19, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
34 …{ 0x98, 0xED, 0x00, 8, 0x40, 1, 2048, 0x0C, 20, 0x8, 0, { 0x04, 0x0C, 0x08, 0x10 }, &sfc_nand_get_…
36 …{ 0x98, 0xEB, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
38 …{ 0x98, 0xE2, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
41 …{ 0xC2, 0x12, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
43 …{ 0xC2, 0x22, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
45 …{ 0xC2, 0x26, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
47 …{ 0xC2, 0x37, 0x00, 8, 0x40, 1, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
49 …{ 0xC2, 0x92, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
51 …{ 0xC2, 0xA2, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
53 …{ 0xC2, 0x96, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
55 …{ 0xC2, 0xA6, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
57 …{ 0xC2, 0xB7, 0x00, 8, 0x40, 1, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
60 …{ 0xC8, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
62 …{ 0xC8, 0xD1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
64 …{ 0xC8, 0xD2, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
66 …{ 0xC8, 0x51, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
68 …{ 0xC8, 0x52, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
70 …{ 0xC8, 0xC1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
72 …{ 0xC8, 0x45, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
74 …{ 0xC8, 0x55, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
76 …{ 0xC8, 0xD9, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
78 …{ 0xC8, 0x41, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
80 …{ 0xC8, 0x42, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
82 …{ 0xC8, 0x82, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
84 …{ 0xC8, 0x92, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
86 …{ 0xC8, 0x91, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
88 …{ 0xC8, 0xF4, 0x00, 4, 0x40, 2, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x08, 0x14, 0x18 }, &sfc_nand_get_…
91 …{ 0xEF, 0xAA, 0x21, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
93 …{ 0xEF, 0xAA, 0x22, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
95 …{ 0xEF, 0xAA, 0x23, 4, 0x40, 1, 4096, 0x4C, 20, 0x8, 0, { 0x04, 0x14, 0x24, 0x34 }, &sfc_nand_get_…
97 …{ 0xEF, 0xBA, 0x21, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
99 …{ 0xEF, 0xBA, 0x22, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_…
101 …{ 0xEF, 0xAA, 0x20, 4, 0x40, 1, 512, 0x4C, 17, 0x1, 0, { 0x04, 0x14, 0x24, 0xFF }, &sfc_nand_get_e…
103 …{ 0xEF, 0xAE, 0x21, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 0, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
106 …{ 0xC9, 0x52, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0xE, 1, { 0x04, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
108 …{ 0xC9, 0x21, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
110 …{ 0xC9, 0xA1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
112 …{ 0xC9, 0x22, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
114 …{ 0xC9, 0x5A, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0xE, 1, { 0x04, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
116 …{ 0xC9, 0xD4, 0x00, 8, 0x40, 1, 2048, 0x4C, 20, 0xE, 1, { 0x20, 0x40, 0x24, 0x44 }, &sfc_nand_get_…
118 …{ 0xC9, 0x82, 0x00, 4, 0x40, 1, 2048, 0x4C, 20, 0xE, 1, { 0x04, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
120 …{ 0xC9, 0x81, 0x00, 4, 0x40, 1, 1024, 0x4C, 20, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
123 …{ 0xCD, 0xB1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x10, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
125 …{ 0xCD, 0xA2, 0x00, 4, 0x40, 1, 2048, 0x00, 19, 0x4, 0, { 0x10, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
127 …{ 0xCD, 0xEA, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
129 …{ 0xCD, 0xEB, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
131 …{ 0xCD, 0xEC, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
133 …{ 0xCD, 0x71, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
135 …{ 0xCD, 0x72, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
137 …{ 0xCD, 0x70, 0x00, 4, 0x40, 1, 512, 0x4C, 17, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_e…
139 …{ 0xCD, 0x60, 0x00, 4, 0x40, 1, 512, 0x4C, 17, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_e…
142 …{ 0xE5, 0x71, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
144 …{ 0xE5, 0x72, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
146 …{ 0xE5, 0x21, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
148 …{ 0xE5, 0x22, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
150 …{ 0xE5, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
152 …{ 0xE5, 0xF2, 0x00, 4, 0x40, 2, 1024, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
154 …{ 0xE5, 0xF4, 0x00, 4, 0x40, 2, 2048, 0x0C, 20, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
156 …{ 0xE5, 0xA1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
158 …{ 0xE5, 0xF5, 0x00, 4, 0x40, 1, 512, 0x0C, 17, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_e…
160 …{ 0xE5, 0xA5, 0x00, 4, 0x40, 1, 512, 0x0C, 17, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_e…
163 …{ 0xD5, 0x22, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
165 …{ 0xD5, 0x20, 0x00, 4, 0x40, 1, 2048, 0x0C, 19, 0x8, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
167 …{ 0xD5, 0x03, 0x00, 8, 0x40, 1, 2048, 0x4C, 20, 0x8, 1, { 0x04, 0x28, 0x08, 0x2C }, &sfc_nand_get_…
169 …{ 0xD5, 0x25, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
172 …{ 0x0B, 0xE2, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
174 …{ 0x0B, 0xE1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
176 …{ 0x0B, 0xE3, 0x00, 4, 0x80, 1, 2048, 0x4C, 20, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
178 …{ 0x0B, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
180 …{ 0x0B, 0xF2, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
182 …{ 0x0B, 0x11, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
184 …{ 0x0B, 0x12, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
186 …{ 0x0B, 0x13, 0x00, 8, 0x40, 1, 2048, 0x4C, 20, 0x8, 1, { 0x04, 0x08, 0x0C, 0x10 }, &sfc_nand_get_…
188 …{ 0x0B, 0x15, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
191 …{ 0x2C, 0x24, 0x00, 4, 0x40, 2, 1024, 0x4C, 19, 0x8, 0, { 0x20, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
193 …{ 0x2C, 0x14, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x8, 0, { 0x20, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
196 …{ 0xA1, 0xA1, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x00, 0x04, 0xFF, 0xFF }, &sfc_nand_get_…
198 …{ 0xA1, 0xE4, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
200 …{ 0xA1, 0xE5, 0x00, 4, 0x40, 2, 1024, 0x4C, 19, 0x1, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
202 …{ 0xA1, 0xA5, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
205 …{ 0xC8, 0x21, 0x00, 4, 0x40, 1, 1024, 0x00, 18, 0x1, 0, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
207 …{ 0xC8, 0x01, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x1, 0, { 0x14, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
209 …{ 0x9B, 0x12, 0x00, 4, 0x40, 1, 1024, 0x40, 18, 0x1, 1, { 0x14, 0x24, 0xFF, 0xFF }, &sfc_nand_get_…
211 …{ 0xBC, 0xB3, 0x00, 4, 0x40, 1, 2048, 0x4C, 19, 0x8, 1, { 0x04, 0x10, 0xFF, 0xFF }, &sfc_nand_get_…
213 …{ 0xBF, 0x21, 0x00, 4, 0x40, 1, 1024, 0x40, 18, 0x4, 1, { 0x08, 0x0C, 0xFF, 0xFF }, &sfc_nand_get_…
215 …{ 0xEA, 0xC1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
217 …{ 0xA1, 0xF1, 0x00, 4, 0x40, 1, 1024, 0x0C, 18, 0x4, 1, { 0x04, 0x14, 0xFF, 0xFF }, &sfc_nand_get_…
219 …{ 0x01, 0x15, 0x00, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
221 …{ 0x01, 0x25, 0x00, 4, 0x40, 2, 1024, 0x4C, 19, 0x4, 0, { 0x04, 0x08, 0x0C, 0x10 }, &sfc_nand_get_…
223 …{ 0x01, 0x35, 0x00, 4, 0x40, 2, 2048, 0x4C, 20, 0x4, 0, { 0x04, 0x08, 0x0C, 0x10 }, &sfc_nand_get_…
225 …{ 0x52, 0xBA, 0x13, 4, 0x40, 1, 1024, 0x4C, 18, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
227 …{ 0x52, 0xBA, 0x23, 4, 0x40, 1, 2048, 0x4C, 19, 0x4, 0, { 0x04, 0x08, 0xFF, 0xFF }, &sfc_nand_get_…
238 for (i = 0; i < ARRAY_SIZE(spi_nand_tbl); i++) { in sfc_nand_get_info()
239 if (spi_nand_tbl[i].id0 == nand_id[0] && in sfc_nand_get_info()
257 op.sfcmd.d32 = 0; in sfc_nand_write_en()
260 op.sfctrl.d32 = 0; in sfc_nand_write_en()
262 ret = sfc_request(&op, 0, NULL, 0); in sfc_nand_write_en()
271 op.sfcmd.d32 = 0; in sfc_nand_rw_preset()
272 op.sfcmd.b.cmd = 0xff; in sfc_nand_rw_preset()
275 op.sfctrl.d32 = 0; in sfc_nand_rw_preset()
280 ret = sfc_request(&op, 0, NULL, 0); in sfc_nand_rw_preset()
289 op.sfcmd.d32 = 0; in sfc_nand_read_feature()
290 op.sfcmd.b.cmd = 0x0F; in sfc_nand_read_feature()
293 op.sfctrl.d32 = 0; in sfc_nand_read_feature()
296 *data = 0; in sfc_nand_read_feature()
313 op.sfcmd.d32 = 0; in sfc_nand_write_feature()
314 op.sfcmd.b.cmd = 0x1F; in sfc_nand_write_feature()
318 op.sfctrl.d32 = 0; in sfc_nand_write_feature()
335 *data = 0; in sfc_nand_wait_busy()
337 for (i = 0; i < timeout; i++) { in sfc_nand_wait_busy()
338 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_wait_busy()
345 if (!(status & (1 << 0))) in sfc_nand_wait_busy()
356 * ecc bits: 0xC0[4,5]
357 * 0b00, No bit errors were detected
358 * 0b01, Bit errors were detected and corrected.
359 * 0b10, Multiple bit errors were detected and not corrected.
360 * 0b11, Bits errors were detected and corrected, bit error count
371 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status0()
372 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status0()
377 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status0()
383 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status0()
397 * ecc bits: 0xC0[4,5]
398 * 0b00, No bit errors were detected;
399 * 0b01, Bits errors were detected and corrected, bit error count
401 * 0b10, Multiple bit errors were detected and not corrected;
402 * 0b11, Reserved.
412 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status1()
413 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status1()
418 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status1()
424 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status1()
426 if (ecc == 0) in sfc_nand_get_ecc_status1()
438 * ecc bits: 0xC0[4,5] 0xF0[4,5]
439 * [0b0000, 0b0011], No bit errors were detected;
440 * [0b0100, 0b0111], Bit errors were detected and corrected. Not
442 * [0b1000, 0b1011], Multiple bit errors were detected and
444 * [0b1100, 0b1111], reserved.
454 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status2()
455 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status2()
460 ret = sfc_nand_read_feature(0xF0, &status1); in sfc_nand_get_ecc_status2()
465 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status2()
471 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status2()
472 ecc = (ecc << 2) | ((status1 >> 4) & 0x03); in sfc_nand_get_ecc_status2()
486 * ecc bits: 0xC0[4,5] 0xF0[4,5]
487 * [0b0000, 0b0011], No bit errors were detected;
488 * [0b0100, 0b0111], Bit errors were detected and corrected. Not
490 * [0b1000, 0b1011], Multiple bit errors were detected and
492 * [0b1100, 0b1111], Bit error count equals the bit flip
503 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status3()
504 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status3()
509 ret = sfc_nand_read_feature(0xF0, &status1); in sfc_nand_get_ecc_status3()
514 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status3()
520 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status3()
521 ecc = (ecc << 2) | ((status1 >> 4) & 0x03); in sfc_nand_get_ecc_status3()
535 * ecc bits: 0xC0[2,5]
536 * [0b0000], No bit errors were detected;
537 * [0b0001, 0b0111], Bit errors were detected and corrected. Not
539 * [0b1000], Multiple bit errors were detected and
541 * [0b1100], Bit error count equals the bit flip
553 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status4()
554 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status4()
559 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status4()
565 ecc = (status >> 2) & 0x0f; in sfc_nand_get_ecc_status4()
579 * ecc bits: 0xC0[4,6]
580 * [0b000], No bit errors were detected;
581 * [0b001, 0b011], Bit errors were detected and corrected. Not
583 * [0b100], Bit error count equals the bit flip
585 * [0b101, 0b110], Reserved;
586 * [0b111], Multiple bit errors were detected and
597 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status5()
598 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status5()
603 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status5()
609 ecc = (status >> 4) & 0x07; in sfc_nand_get_ecc_status5()
623 * ecc bits: 0xC0[4,6]
624 * [0b000], No bit errors were detected;
625 * [0b001], 1-3 Bit errors were detected and corrected. Not
627 * [0b010], Multiple bit errors were detected and
629 * [0b011], 4-6 Bit errors were detected and corrected. Not
631 * [0b101], Bit error count equals the bit flip
643 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status6()
644 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status6()
649 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status6()
655 ecc = (status >> 4) & 0x07; in sfc_nand_get_ecc_status6()
657 if (ecc == 0 || ecc == 1 || ecc == 3) in sfc_nand_get_ecc_status6()
669 * ecc bits: 0xC0[4,7]
670 * [0b0000], No bit errors were detected;
671 * [0b0001, 0b0111], 1-7 Bit errors were detected and corrected. Not
673 * [0b1000], 8 Bit errors were detected and corrected. Bit error count
675 * [0b1111], Bit errors greater than ECC capability(8 bits) and not corrected;
686 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status7()
687 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status7()
692 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status7()
698 ecc = (status >> 4) & 0xf; in sfc_nand_get_ecc_status7()
712 * ecc bits: 0xC0[4,6]
713 * [0b000], No bit errors were detected;
714 * [0b001, 0b011], 1~3 Bit errors were detected and corrected. Not
716 * [0b100], Bit error count equals the bit flip
728 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status8()
729 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status8()
734 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status8()
740 ecc = (status >> 4) & 0x07; in sfc_nand_get_ecc_status8()
754 * ecc bits: 0xC0[4,5]
755 * 0b00, No bit errors were detected
756 * 0b01, 1-2Bit errors were detected and corrected.
757 * 0b10, 3-4Bit errors were detected and corrected.
758 * 0b11, 11 can be used as uncorrectable
768 for (i = 0; i < timeout; i++) { in sfc_nand_get_ecc_status9()
769 ret = sfc_nand_read_feature(0xC0, &status); in sfc_nand_get_ecc_status9()
774 if (!(status & (1 << 0))) in sfc_nand_get_ecc_status9()
780 ecc = (status >> 4) & 0x03; in sfc_nand_get_ecc_status9()
799 op.sfcmd.d32 = 0; in sfc_nand_erase_block()
800 op.sfcmd.b.cmd = 0xd8; in sfc_nand_erase_block()
804 op.sfctrl.d32 = 0; in sfc_nand_erase_block()
807 ret = sfc_request(&op, addr, NULL, 0); in sfc_nand_erase_block()
826 op.sfcmd.d32 = 0; in sfc_nand_read_cache()
831 op.sfctrl.d32 = 0; in sfc_nand_read_cache()
835 plane = p_nand_info->plane_per_die == 2 ? ((row >> 6) & 0x1) << 12 : 0; in sfc_nand_read_cache()
853 rkflash_print_dio("%s %x %x\n", __func__, addr, p_page_buf[0]); in sfc_nand_prog_page_raw()
861 op.sfcmd.d32 = 0; in sfc_nand_prog_page_raw()
866 op.sfctrl.d32 = 0; in sfc_nand_prog_page_raw()
869 plane = p_nand_info->plane_per_die == 2 ? ((addr >> 6) & 0x1) << 12 : 0; in sfc_nand_prog_page_raw()
879 sfc_nand_read_cache(addr, (u32 *)sfc_nand_dev.recheck_buffer, 0, data_area_size); in sfc_nand_prog_page_raw()
887 op.sfcmd.d32 = 0; in sfc_nand_prog_page_raw()
888 op.sfcmd.b.cmd = 0x10; in sfc_nand_prog_page_raw()
892 op.sfctrl.d32 = 0; in sfc_nand_prog_page_raw()
893 ret = sfc_request(&op, addr, p_page_buf, 0); in sfc_nand_prog_page_raw()
913 memset(&gp_page_buf[data_size / 4], 0xff, sec_per_page * 16); in sfc_nand_prog_page()
914 gp_page_buf[(data_size + meta->off0) / 4] = p_spare[0]; in sfc_nand_prog_page()
935 op.sfcmd.d32 = 0; in sfc_nand_read()
936 op.sfcmd.b.cmd = 0x13; in sfc_nand_read()
940 op.sfctrl.d32 = 0; in sfc_nand_read()
942 sfc_request(&op, row, p_page_buf, 0); in sfc_nand_read()
952 op.sfcmd.d32 = 0; in sfc_nand_read()
957 op.sfctrl.d32 = 0; in sfc_nand_read()
961 plane = p_nand_info->plane_per_die == 2 ? ((row >> 6) & 0x1) << 12 : 0; in sfc_nand_read()
963 rkflash_print_dio("%s %x %x\n", __func__, row, p_page_buf[0]); in sfc_nand_read()
975 return sfc_nand_read(addr, p_page_buf, 0, page_size); in sfc_nand_read_page_raw()
987 p_spare[0] = gp_page_buf[(data_size + meta->off0) / 4]; in sfc_nand_read_page()
999 rkflash_print_error("%s[0x%x], ret=0x%x\n", __func__, addr, ret); in sfc_nand_read_page()
1015 u32 marker = 0; in sfc_nand_check_bad_block()
1020 if (ret == SFC_NAND_ECC_ERROR || (u16)marker != 0xffff) in sfc_nand_check_bad_block()
1025 if ((u16)marker != 0xffff) in sfc_nand_check_bad_block()
1041 gp_page_buf[data_size / 4] = 0x0; in sfc_nand_mark_bad_block()
1055 op.sfcmd.d32 = 0; in sfc_nand_read_id()
1059 op.sfctrl.d32 = 0; in sfc_nand_read_id()
1062 ret = sfc_request(&op, 0, data, 3); in sfc_nand_read_id()
1079 bad_cnt = 0; in sfc_nand_get_bad_block_list()
1083 for (blk = 0; blk < blk_per_die; blk++) { in sfc_nand_get_bad_block_list()
1127 ret = sfc_nand_read_feature(0xB0, &status); in sfc_nand_enable_QE()
1137 return sfc_nand_write_feature(0xB0, status); in sfc_nand_enable_QE()
1146 id_byte[0], id_byte[1], id_byte[2]); in sfc_nand_init()
1148 if (id_byte[0] == 0xFF || id_byte[0] == 0x00) in sfc_nand_init()
1159 sfc_nand_dev.manufacturer = id_byte[0]; in sfc_nand_init()
1166 sfc_nand_write_feature(0xA0, 0); in sfc_nand_init()
1169 sfc_nand_dev.page_read_cmd = 0x03; in sfc_nand_init()
1170 sfc_nand_dev.page_prog_cmd = 0x02; in sfc_nand_init()
1181 sfc_nand_dev.page_read_cmd = 0x6b; in sfc_nand_init()
1188 sfc_nand_dev.page_prog_cmd = 0x32; in sfc_nand_init()
1191 sfc_nand_read_feature(0xA0, &status); in sfc_nand_init()
1192 rkflash_print_info("sfc_nand A0 = 0x%x\n", status); in sfc_nand_init()
1193 sfc_nand_read_feature(0xB0, &status); in sfc_nand_init()
1194 rkflash_print_info("sfc_nand B0 = 0x%x\n", status); in sfc_nand_init()