]> git.ipfire.org Git - people/arne_f/kernel.git/commit
spi: pxa2xx: Add CS control clock quirk
authorEvan Green <evgreen@chromium.org>
Tue, 11 Feb 2020 22:37:00 +0000 (14:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2020 14:34:13 +0000 (16:34 +0200)
commit80211ce55d8ca17deeebdf90171493f597f01bb4
treefcd490638aec0390acc2a537b8466ae82e5161b0
parent5567dc658363d57edda0a000e5edabaacf4ee7d4
spi: pxa2xx: Add CS control clock quirk

[ Upstream commit 683f65ded66a9a7ff01ed7280804d2132ebfdf7e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-pxa2xx.c