OSDN Git Service

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)
committerMark Brown <broonie@kernel.org>
Wed, 11 Dec 2019 16:48:32 +0000 (16:48 +0000)
commitc52c91bb9aa6bd8c38dbf9776158e33038aedd43
tree79b8e4561191590b0f44f05384f7af2f97ff4454
parent3194d2533efffae8b815d84729ecc58b6a9000ab
spi: spi-ti-qspi: Fix a bug when accessing non default CS

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>
drivers/spi/spi-ti-qspi.c