@@ -76,6 +76,18 @@ static int w25m02gv_select_target(struct spinand_device *spinand,
76
76
return spi_mem_exec_op (spinand -> spimem , & op );
77
77
}
78
78
79
+ static int w25n01kv_ooblayout_ecc (struct mtd_info * mtd , int section ,
80
+ struct mtd_oob_region * region )
81
+ {
82
+ if (section > 3 )
83
+ return - ERANGE ;
84
+
85
+ region -> offset = 64 + (8 * section );
86
+ region -> length = 7 ;
87
+
88
+ return 0 ;
89
+ }
90
+
79
91
static int w25n02kv_ooblayout_ecc (struct mtd_info * mtd , int section ,
80
92
struct mtd_oob_region * region )
81
93
{
@@ -100,6 +112,11 @@ static int w25n02kv_ooblayout_free(struct mtd_info *mtd, int section,
100
112
return 0 ;
101
113
}
102
114
115
+ static const struct mtd_ooblayout_ops w25n01kv_ooblayout = {
116
+ .ecc = w25n01kv_ooblayout_ecc ,
117
+ .free = w25n02kv_ooblayout_free ,
118
+ };
119
+
103
120
static const struct mtd_ooblayout_ops w25n02kv_ooblayout = {
104
121
.ecc = w25n02kv_ooblayout_ecc ,
105
122
.free = w25n02kv_ooblayout_free ,
@@ -163,6 +180,15 @@ static const struct spinand_info winbond_spinand_table[] = {
163
180
& update_cache_variants ),
164
181
0 ,
165
182
SPINAND_ECCINFO (& w25m02gv_ooblayout , NULL )),
183
+ SPINAND_INFO ("W25N01KV" ,
184
+ SPINAND_ID (SPINAND_READID_METHOD_OPCODE_DUMMY , 0xae , 0x21 ),
185
+ NAND_MEMORG (1 , 2048 , 96 , 64 , 1024 , 20 , 1 , 1 , 1 ),
186
+ NAND_ECCREQ (4 , 512 ),
187
+ SPINAND_INFO_OP_VARIANTS (& read_cache_variants ,
188
+ & write_cache_variants ,
189
+ & update_cache_variants ),
190
+ 0 ,
191
+ SPINAND_ECCINFO (& w25n01kv_ooblayout , w25n02kv_ecc_get_status )),
166
192
SPINAND_INFO ("W25N02KV" ,
167
193
SPINAND_ID (SPINAND_READID_METHOD_OPCODE_DUMMY , 0xaa , 0x22 ),
168
194
NAND_MEMORG (1 , 2048 , 128 , 64 , 2048 , 40 , 1 , 1 , 1 ),
0 commit comments