]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: airoha: fix dirmap_{read,write} operations
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 13 Sep 2024 21:07:13 +0000 (23:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:33:16 +0000 (16:33 +0200)
commitd8e267c24cc4b8733aed7bf9dcb3407fbfe81edc
tree4e3bada8e6132cea38011820db6ea736fe95a7ff
parentde43021c72993877a8f86f9fddfa0687609da5a4
spi: airoha: fix dirmap_{read,write} operations

[ Upstream commit 2e6bbfe7b0c0607001b784082c2685b134174fac ]

SPI_NFI_READ_FROM_CACHE_DONE bit must be written at the end of
dirmap_read operation even if it is already set.
In the same way, SPI_NFI_LOAD_TO_CACHE_DONE bit must be written at the
end of dirmap_write operation even if it is already set.
For this reason use regmap_write_bits() instead of regmap_set_bits().
This patch fixes mtd_pagetest kernel module test.

Fixes: a403997c1201 ("spi: airoha: add SPI-NAND Flash controller driver")
Tested-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20240913-airoha-spi-fixes-v1-1-de2e74ed4664@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-airoha-snfi.c