Skip to content

Commit da8f489

Browse files
committed
mtd: spinand: winbond: Register W35N vendor specific operation
Provide the Winbond W35N specific "write VCR register" operation to let the core verify it is supported by the controller before using it. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent 62dce7e commit da8f489

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/mtd/nand/spi/winbond.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ static SPINAND_OP_VARIANTS(update_cache_variants,
9393
SPI_MEM_OP_NO_DUMMY, \
9494
SPI_MEM_OP_DATA_OUT(1, buf, 1))
9595

96+
static SPINAND_OP_VARIANTS(winbond_w35_ops,
97+
SPINAND_WINBOND_WRITE_VCR_1S_1S_1S(0, NULL));
98+
9699
static struct spi_mem_op
97100
spinand_fill_winbond_write_vcr_op(struct spinand_device *spinand, u8 reg, void *valptr)
98101
{
@@ -469,6 +472,7 @@ static const struct spinand_info winbond_spinand_table[] = {
469472
&write_cache_octal_variants,
470473
&update_cache_octal_variants),
471474
0,
475+
SPINAND_INFO_VENDOR_OPS(&winbond_w35_ops),
472476
SPINAND_ECCINFO(&w35n01jw_ooblayout, NULL),
473477
SPINAND_CONFIGURE_CHIP(w35n0xjw_vcr_cfg)),
474478
SPINAND_INFO("W35N02JW", /* 1.8V */
@@ -479,6 +483,7 @@ static const struct spinand_info winbond_spinand_table[] = {
479483
&write_cache_octal_variants,
480484
&update_cache_octal_variants),
481485
0,
486+
SPINAND_INFO_VENDOR_OPS(&winbond_w35_ops),
482487
SPINAND_ECCINFO(&w35n01jw_ooblayout, NULL),
483488
SPINAND_CONFIGURE_CHIP(w35n0xjw_vcr_cfg)),
484489
SPINAND_INFO("W35N04JW", /* 1.8V */
@@ -489,6 +494,7 @@ static const struct spinand_info winbond_spinand_table[] = {
489494
&write_cache_octal_variants,
490495
&update_cache_octal_variants),
491496
0,
497+
SPINAND_INFO_VENDOR_OPS(&winbond_w35_ops),
492498
SPINAND_ECCINFO(&w35n01jw_ooblayout, NULL),
493499
SPINAND_CONFIGURE_CHIP(w35n0xjw_vcr_cfg)),
494500
/* 2G-bit densities */

0 commit comments

Comments
 (0)