u-boot/drivers/mtd/spi
Weijie Gao 60e2bf4678 mtd: spi-nor: fix page program issue when using spi-mem driver
Some SPI controllers can't write nor->page_size bytes in a single step
because their TX FIFO is too small, but when that happens we should
make sure a WRITE_EN command before each write access and READ_SR command
after each write access is issued.

We should allow nor->write() to return a size that is smaller than the
requested write size to gracefully handle this case.

Also, the spi_nor_write_data() should return the actual number of bytes
that were written during the spi_mem_exec_op() operation.

This patch is a combination of two commits backported from kernel:

  commit 630d6bd8a3b4 ("mtd: spi-nor: Support controllers with limit ...")
  commit 3baa8ec88c2f ("mtd: devices: m25p80: Make sure WRITE_EN is ...")

Cc: Vignesh R <vigneshr@ti.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Vignesh R <vigneshr@ti.com>
Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com> # microzed
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
2019-05-03 15:26:12 +05:30
..
fsl_espi_spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig dm: spi: Read default speed and mode values from DT 2019-04-12 11:54:50 +05:30
Makefile mtd: spi: Add lightweight SPI flash stack for SPL 2019-02-07 15:33:21 +05:30
sandbox.c mtd: spi: Switch to new SPI NOR framework 2019-02-07 15:33:21 +05:30
sf-uclass.c sf: Add a method to obtain the block-protect setting 2018-11-20 19:14:22 -07:00
sf.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sf_dataflash.c mtd: spi: Switch to new SPI NOR framework 2019-02-07 15:33:21 +05:30
sf_internal.h mtd: spi: Add lightweight SPI flash stack for SPL 2019-02-07 15:33:21 +05:30
sf_mtd.c mtd: sf: Make sf_mtd.c more robust 2018-12-06 00:45:36 +05:30
sf_probe.c mtd: sf_probe: remove spi-flash compatible 2019-04-12 10:54:27 +05:30
spi-nor-core.c mtd: spi-nor: fix page program issue when using spi-mem driver 2019-05-03 15:26:12 +05:30
spi-nor-ids.c mtd: spi-nor-ids: Add Gigadevice gd25lq128 ID 2019-04-12 18:41:33 +05:30
spi-nor-tiny.c mtd: spi: Add lightweight SPI flash stack for SPL 2019-02-07 15:33:21 +05:30