]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:20:41 +0000 (08:20 +0100)
commitf9a2a8b8a5d4a84438e84b32424e262046a9cc3d
tree751aa99fdc9895592678534107ac1e484009dc2d
parent6664533b4fc1cf0117495f2fcebc8f4b22da83a5
mtd: devices: m25p80: Make sure WRITE_EN is issued before each write

[ Upstream commit 3baa8ec88c2feb902328e59a4dcf0f0aaab7d2ff ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/devices/m25p80.c