@@ -122,6 +122,41 @@ static const struct mtd_ooblayout_ops w25n02kv_ooblayout = {
122
122
.free = w25n02kv_ooblayout_free ,
123
123
};
124
124
125
+ static int w25n01jw_ooblayout_ecc (struct mtd_info * mtd , int section ,
126
+ struct mtd_oob_region * region )
127
+ {
128
+ if (section > 3 )
129
+ return - ERANGE ;
130
+
131
+ region -> offset = (16 * section ) + 12 ;
132
+ region -> length = 4 ;
133
+
134
+ return 0 ;
135
+ }
136
+
137
+ static int w25n01jw_ooblayout_free (struct mtd_info * mtd , int section ,
138
+ struct mtd_oob_region * region )
139
+ {
140
+ if (section > 3 )
141
+ return - ERANGE ;
142
+
143
+ region -> offset = (16 * section );
144
+ region -> length = 12 ;
145
+
146
+ /* Extract BBM */
147
+ if (!section ) {
148
+ region -> offset += 2 ;
149
+ region -> length -= 2 ;
150
+ }
151
+
152
+ return 0 ;
153
+ }
154
+
155
+ static const struct mtd_ooblayout_ops w25n01jw_ooblayout = {
156
+ .ecc = w25n01jw_ooblayout_ecc ,
157
+ .free = w25n01jw_ooblayout_free ,
158
+ };
159
+
125
160
static int w25n02kv_ecc_get_status (struct spinand_device * spinand ,
126
161
u8 status )
127
162
{
@@ -206,7 +241,7 @@ static const struct spinand_info winbond_spinand_table[] = {
206
241
& write_cache_variants ,
207
242
& update_cache_variants ),
208
243
0 ,
209
- SPINAND_ECCINFO (& w25m02gv_ooblayout , NULL )),
244
+ SPINAND_ECCINFO (& w25n01jw_ooblayout , NULL )),
210
245
SPINAND_INFO ("W25N02JWZEIF" ,
211
246
SPINAND_ID (SPINAND_READID_METHOD_OPCODE_DUMMY , 0xbf , 0x22 ),
212
247
NAND_MEMORG (1 , 2048 , 64 , 64 , 1024 , 20 , 1 , 2 , 1 ),
0 commit comments