spi: spi-ti-qspi: Fix a bug when accessing non default CS
authorVignesh Raghavendra <vigneshr@ti.com>
Wed, 11 Dec 2019 15:52:16 +0000 (21:22 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 11:17:12 +0000 (12:17 +0100)
commit5821a1e91e0f904e0cbc0d3e3fd0752795830801
treeb9cce218f2507c5553e80735678d7698a42ffd7d
parente240f26a7f1d357984ea15152f0a746fc5f815ac
spi: spi-ti-qspi: Fix a bug when accessing non default CS

[ Upstream commit c52c91bb9aa6bd8c38dbf9776158e33038aedd43 ]

When switching ChipSelect from default CS0 to any other CS, driver fails
to update the bits in system control module register that control which
CS is mapped for MMIO access. This causes reads to fail when driver
tries to access QSPI flash on CS1/2/3.

Fix this by updating appropriate bits whenever active CS changes.

Reported-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20191211155216.30212-1-vigneshr@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-ti-qspi.c