]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: micron-st: Skip FSR reading if SPI controller does not support it
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 6 May 2022 10:51:58 +0000 (13:51 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 19 Jul 2022 09:20:23 +0000 (12:20 +0300)
commitab92fed20f02f84bca82d43322a24c3ea8e2d16d
treecc86a2c40cb0bd01591d7e085ef184fb1513480e
parent30fc27b797a5b181bb193268036dfdc4cb3b5579
mtd: spi-nor: micron-st: Skip FSR reading if SPI controller does not support it

The Intel SPI controller does not support low level operations, like
reading the flag status register (FSR). It only exposes a set of high
level operations for software to use. For this reason check the return
value of micron_st_nor_read_fsr() and if the operation was not
supported, use the status register value only. This allows the chip to
work even when attached to Intel SPI controller (there are such systems
out there).

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20220506105158.43613-1-mika.westerberg@linux.intel.com
drivers/mtd/spi-nor/micron-st.c