spi: pxa2xx: Add CS control clock quirk
authorEvan Green <evgreen@chromium.org>
Tue, 11 Feb 2020 22:37:00 +0000 (14:37 -0800)
committerMark Brown <broonie@kernel.org>
Wed, 26 Feb 2020 18:45:06 +0000 (18:45 +0000)
commit683f65ded66a9a7ff01ed7280804d2132ebfdf7e
tree2f8e48dd1713364f03ad8571217b67f766e51afb
parent138c9c32f090894614899eca15e0bb7279f59865
spi: pxa2xx: Add CS control clock quirk

In some circumstances on Intel LPSS controllers, toggling the LPSS
CS control register doesn't actually cause the CS line to toggle.
This seems to be failure of dynamic clock gating that occurs after
going through a suspend/resume transition, where the controller
is sent through a reset transition. This ruins SPI transactions
that either rely on delay_usecs, or toggle the CS line without
sending data.

Whenever CS is toggled, momentarily set the clock gating register
to "Force On" to poke the controller into acting on CS.

Signed-off-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Evan Green <evgreen@chromium.org>
Link: https://lore.kernel.org/r/20200211223700.110252-1-rajatja@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c