]> git.hungrycats.org Git - linux/commit
spi: davinci: Unset POWERDOWN bit when releasing resources
authorBastien Curutchet <bastien.curutchet@bootlin.com>
Mon, 24 Jun 2024 07:17:45 +0000 (09:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2024 07:53:39 +0000 (09:53 +0200)
commitf8900df168d1d30238fda2566e94beff556d04bd
tree3e7865fd20e6839615cdfc3458240241c2a2da43
parentd3d78486d617e8e1125c81749124960c5cf0bad5
spi: davinci: Unset POWERDOWN bit when releasing resources

[ Upstream commit 1762dc01fc78ef5f19693e9317eae7491c6c7e1b ]

On the OMAPL138, the SPI reference clock is provided by the Power and
Sleep Controller (PSC). The PSC's datasheet says that 'some peripherals
have special programming requirements and additional recommended steps
you must take before you can invoke the PSC module state transition'. I
didn't find more details in documentation but it appears that PSC needs
the SPI to clear the POWERDOWN bit before disabling the clock. Indeed,
when this bit is set, the PSC gets stuck in transitions from enable to
disable state.

Clear the POWERDOWN bit when releasing driver's resources

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20240624071745.17409-1-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-davinci.c