linux/drivers/mtd/spi-nor
Patrice Chotard f8cd9f632f mtd: spi-nor: fix spi_nor_spimem_setup_op() call in spi_nor_erase_{sector,chip}()
For erase operations, reg_proto must be used as indicated in
struct spi_nor description in spi-nor.h.

This issue was found when DT property spi-tx-bus-width is set to 4.
In this case the spi_mem_op->addr.buswidth is set to 4 for erase command
which is not correct.

Tested on stm32mp157c-ev1 board with mx66l51235f spi-nor.

Fixes: 0e30f47232 ("mtd: spi-nor: add support for DTR protocol")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
[ta: use nor->reg_proto in spi_nor_controller_ops_erase()]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220629133013.3382393-1-patrice.chotard@foss.st.com
2022-07-28 05:34:23 +03:00
..
controllers mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
atmel.c mtd: spi-nor: atmel: unify function names 2022-02-25 09:44:31 +02:00
catalyst.c mtd: spi-nor: catalyst: unify function names 2022-02-25 09:44:31 +02:00
core.c mtd: spi-nor: fix spi_nor_spimem_setup_op() call in spi_nor_erase_{sector,chip}() 2022-07-28 05:34:23 +03:00
core.h mtd: spi-nor: core: Track flash's internal address mode 2022-07-28 05:14:28 +03:00
debugfs.c mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
eon.c mtd: spi-nor: support eon en25qh256a variant 2022-05-09 16:58:24 +05:30
esmt.c mtd: spi-nor: esmt: Use correct name of f25l32qa 2022-07-19 13:05:31 +03:00
everspin.c mtd: spi-nor: everspin: unify function names 2022-02-25 09:44:31 +02:00
fujitsu.c mtd: spi-nor: fujitsu: unify function names 2022-02-25 09:44:31 +02:00
gigadevice.c mtd: spi-nor: gigadevice: unify function names 2022-02-25 09:44:31 +02:00
intel.c mtd: spi-nor: intel: unify function names 2022-02-25 09:44:31 +02:00
issi.c mtd: spi-nor: Do not change nor->addr_nbytes at SFDP parsing time 2022-07-28 05:11:56 +03: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: macronix: unify function names 2022-02-25 09:44:31 +02:00
Makefile mtd: spi-nor: expose internal parameters via debugfs 2022-05-09 16:55:22 +05:30
micron-st.c mtd: spi-nor: micron-st: Skip FSR reading if SPI controller does not support it 2022-07-19 12:20:23 +03:00
otp.c mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
sfdp.c mtd: spi-nor: core: Track flash's internal address mode 2022-07-28 05:14:28 +03: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: spansion: Add s25hl-t/s25hs-t IDs and fixups 2022-07-28 05:19:27 +03:00
sst.c mtd: spi-nor: sst: unify function names 2022-02-25 09:44:32 +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: winbond: add support for W25Q512NW-IM 2022-05-09 16:56:20 +05:30
xilinx.c mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
xmc.c mtd: spi-nor: xmc: unify function names 2022-02-25 09:44:32 +02:00