Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: tegra20-slink: Ensure SPI controller reset is deasserted

Commit 4782c0a5dd88 ("clk: tegra: Don't deassert reset on enabling
clocks") removed some legacy code for handling resets on Tegra from
within the Tegra clock code. This exposed an issue in the Tegra20 slink
driver where the SPI controller reset was not being deasserted as needed
during probe. This is causing the Tegra30 Cardhu platform to hang on
boot. Fix this by ensuring the SPI controller reset is deasserted during
probe.

Fixes: 4782c0a5dd88 ("clk: tegra: Don't deassert reset on enabling clocks")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20210608071518.93037-1-jonathanh@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jon Hunter and committed by
Mark Brown
aceda401 d38fa9a1

+5
+5
drivers/spi/spi-tegra20-slink.c
··· 1118 1118 pm_runtime_put_noidle(&pdev->dev); 1119 1119 goto exit_pm_disable; 1120 1120 } 1121 + 1122 + reset_control_assert(tspi->rst); 1123 + udelay(2); 1124 + reset_control_deassert(tspi->rst); 1125 + 1121 1126 tspi->def_command_reg = SLINK_M_S; 1122 1127 tspi->def_command2_reg = SLINK_CS_ACTIVE_BETWEEN; 1123 1128 tegra_slink_writel(tspi, tspi->def_command_reg, SLINK_COMMAND);