]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: atmel-quadspi: Avoid overwriting delay register settings
authorAlexander Dahl <ada@thorsis.com>
Wed, 18 Sep 2024 08:27:43 +0000 (10:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:33:17 +0000 (16:33 +0200)
commit78fac439da12943dd7b7ba93f76159001e6c9b56
tree5083625f1a2a105eb523c089a4efdd7544d474c3
parent3b0092907ccf20d73886be464597d7850dabe6dc
spi: atmel-quadspi: Avoid overwriting delay register settings

[ Upstream commit 329ca3eed4a9a161515a8714be6ba182321385c7 ]

Previously the MR and SCR registers were just set with the supposedly
required values, from cached register values (cached reg content
initialized to zero).

All parts fixed here did not consider the current register (cache)
content, which would make future support of cs_setup, cs_hold, and
cs_inactive impossible.

Setting SCBR in atmel_qspi_setup() erases a possible DLYBS setting from
atmel_qspi_set_cs_timing().  The DLYBS setting is applied by ORing over
the current setting, without resetting the bits first.  All writes to MR
did not consider possible settings of DLYCS and DLYBCT.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Fixes: f732646d0ccd ("spi: atmel-quadspi: Add support for configuring CS timing")
Link: https://patch.msgid.link/20240918082744.379610-2-ada@thorsis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/atmel-quadspi.c