linux-stable/drivers/mtd/spi-nor
Pratyush Yadav 0d051a4982 mtd: spi-nor: core: use 2 data bytes for template ops
The template ops used in spi_nor_spimem_check_pp() and
spi_nor_spimem_check_readop() currently set the data phase to 1 byte
long. This is problematic for 8D-8D-8D protocol where odd length data
phase is invalid since one cycle transfers 2 bytes and odd number of
bytes would mean half a cycle is left over. This could result in a
controller rejecting the op as "not supported" even though it actually
supports the protocol.

Change the data length to 2 bytes in these templates. One might argue
that this should only be done for 8D-8D-8D operations but when talking
about these templates, there is no functional difference between one and
two bytes, even in STR modes.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20210531181757.19458-2-p.yadav@ti.com
2021-12-23 15:04:13 +02:00
..
controllers mtd: spi-nor: nxp-spifi: Make use of the helper function devm_platform_ioremap_resource_byname() 2021-10-15 11:58:50 +03:00
atmel.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
catalyst.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
core.c mtd: spi-nor: core: use 2 data bytes for template ops 2021-12-23 15:04:13 +02:00
core.h mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
eon.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
esmt.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
everspin.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
fujitsu.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
gigadevice.c mtd: spi-nor: Constify part specific fixup hooks 2021-12-23 10:17:03 +02:00
intel.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
issi.c mtd: spi-nor: Constify part specific fixup hooks 2021-12-23 10:17:03 +02:00
Kconfig mtd: spi-nor: keep lock bits if they are non-volatile 2020-12-07 23:01:15 +05:30
macronix.c mtd: spi-nor: Constify part specific fixup hooks 2021-12-23 10:17:03 +02:00
Makefile mtd: spi-nor: add initial sysfs support 2021-06-15 23:18:32 +05:30
micron-st.c mtd: spi-nor: Constify part specific fixup hooks 2021-12-23 10:17:03 +02:00
otp.c mtd: spi-nor: Introduce spi_nor_set_mtd_info() 2021-12-07 17:05:10 +02:00
sfdp.c mtd: spi-nor: core: Call spi_nor_post_sfdp_fixups() only when SFDP is defined 2021-12-07 17:05:10 +02:00
sfdp.h mtd: spi-nor: Get rid of duplicated argument in spi_nor_parse_sfdp() 2021-03-15 18:01:47 +02:00
spansion.c mtd: spi-nor: Constify part specific fixup hooks 2021-12-23 10:17:03 +02:00
sst.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00
swp.c mtd: spi-nor: Introduce spi_nor_set_mtd_info() 2021-12-07 17:05:10 +02:00
sysfs.c mtd: spi-nor: add initial sysfs support 2021-06-15 23:18:32 +05:30
winbond.c mtd: spi-nor: Constify part specific fixup hooks 2021-12-23 10:17:03 +02:00
xilinx.c mtd: spi-nor: core: Don't use mtd_info in the NOR's probe sequence of calls 2021-12-07 17:05:10 +02:00
xmc.c mtd: spi-nor: Rework the flash_info flags 2021-12-07 17:05:11 +02:00