]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: devices: m25p80: Make sure WRITE_EN is issued before each write
authorYogesh Gaur <yogeshnarayan.gaur@nxp.com>
Wed, 13 Jun 2018 06:09:18 +0000 (11:39 +0530)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 8 Oct 2018 19:28:27 +0000 (21:28 +0200)
commit700cd31419ac4f655e1f2ee7ae08f55c020ac879
tree93335a4c7dc4347f0d4fec6228a1e2f2656273b0
parent41a9aaefc5f711ba90901f7335a30f2b5debf833
mtd: devices: m25p80: Make sure WRITE_EN is issued before each write

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.

The core is already taking care of that, so all we have to do here is
return the actual number of bytes that were written during the
spi_mem_exec_op() operation.

Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/devices/m25p80.c