|
10 | 10 | #include <linux/device.h>
|
11 | 11 | #include <linux/kernel.h>
|
12 | 12 | #include <linux/mtd/spinand.h>
|
| 13 | +#include <linux/units.h> |
13 | 14 |
|
14 | 15 | #define SPINAND_MFR_WINBOND 0xEF
|
15 | 16 |
|
16 | 17 | #define WINBOND_CFG_BUF_READ BIT(3)
|
17 | 18 |
|
18 | 19 | #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4)
|
19 | 20 |
|
| 21 | +static SPINAND_OP_VARIANTS(read_cache_dtr_variants, |
| 22 | + SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), |
| 23 | + SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), |
| 24 | + SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0), |
| 25 | + SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0), |
| 26 | + SPINAND_PAGE_READ_FROM_CACHE_FAST_OP(0, 1, NULL, 0), |
| 27 | + SPINAND_PAGE_READ_FROM_CACHE_OP(0, 1, NULL, 0, 54 * HZ_PER_MHZ)); |
| 28 | + |
20 | 29 | static SPINAND_OP_VARIANTS(read_cache_variants,
|
21 | 30 | SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0),
|
22 | 31 | SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
|
@@ -194,7 +203,7 @@ static const struct spinand_info winbond_spinand_table[] = {
|
194 | 203 | SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xbc, 0x21),
|
195 | 204 | NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
|
196 | 205 | NAND_ECCREQ(1, 512),
|
197 |
| - SPINAND_INFO_OP_VARIANTS(&read_cache_variants, |
| 206 | + SPINAND_INFO_OP_VARIANTS(&read_cache_dtr_variants, |
198 | 207 | &write_cache_variants,
|
199 | 208 | &update_cache_variants),
|
200 | 209 | 0,
|
@@ -223,7 +232,7 @@ static const struct spinand_info winbond_spinand_table[] = {
|
223 | 232 | SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xbf, 0x22),
|
224 | 233 | NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 2, 1),
|
225 | 234 | NAND_ECCREQ(1, 512),
|
226 |
| - SPINAND_INFO_OP_VARIANTS(&read_cache_variants, |
| 235 | + SPINAND_INFO_OP_VARIANTS(&read_cache_dtr_variants, |
227 | 236 | &write_cache_variants,
|
228 | 237 | &update_cache_variants),
|
229 | 238 | 0,
|
|
0 commit comments