Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: spinand: Warn if using SSDR-only vendor commands in a non SSDR mode

Both Macronix and Winbond have chip specific operations which are SSDR
only. Trying to use them in an ODTR setup will fail and doing this is a
pure software bug. Warn explicitly in this case.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

+4
+2
drivers/mtd/nand/spi/macronix.c
··· 53 53 static struct spi_mem_op 54 54 spinand_fill_macronix_read_eccsr_op(struct spinand_device *spinand, void *valptr) 55 55 { 56 + WARN_ON_ONCE(spinand->bus_iface != SSDR); 57 + 56 58 return (struct spi_mem_op)SPINAND_MACRONIX_READ_ECCSR_1S_0_1S(valptr); 57 59 } 58 60
+2
drivers/mtd/nand/spi/winbond.c
··· 114 114 static struct spi_mem_op 115 115 spinand_fill_winbond_select_target_op(struct spinand_device *spinand, void *valptr) 116 116 { 117 + WARN_ON_ONCE(spinand->bus_iface != SSDR); 118 + 117 119 return (struct spi_mem_op)SPINAND_WINBOND_SELECT_TARGET_1S_0_1S(valptr); 118 120 } 119 121