All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: tegra20-slink: Ensure SPI controller reset is deasserted
@ 2021-06-08  7:15 Jon Hunter
  2021-06-08 12:10 ` Thierry Reding
  2021-06-08 16:06 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Jon Hunter @ 2021-06-08  7:15 UTC (permalink / raw)
  To: Mark Brown, Thierry Reding
  Cc: Dmitry Osipenko, linux-spi, linux-tegra, Jon Hunter

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>
---
 drivers/spi/spi-tegra20-slink.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index f7c832fd4003..6a726c95ac7a 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1118,6 +1118,11 @@ static int tegra_slink_probe(struct platform_device *pdev)
 		pm_runtime_put_noidle(&pdev->dev);
 		goto exit_pm_disable;
 	}
+
+	reset_control_assert(tspi->rst);
+	udelay(2);
+	reset_control_deassert(tspi->rst);
+
 	tspi->def_command_reg  = SLINK_M_S;
 	tspi->def_command2_reg = SLINK_CS_ACTIVE_BETWEEN;
 	tegra_slink_writel(tspi, tspi->def_command_reg, SLINK_COMMAND);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-08 16:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08  7:15 [PATCH] spi: tegra20-slink: Ensure SPI controller reset is deasserted Jon Hunter
2021-06-08 12:10 ` Thierry Reding
2021-06-08 12:35   ` Jon Hunter
2021-06-08 13:16     ` Thierry Reding
2021-06-08 15:16       ` Dmitry Osipenko
2021-06-08 16:06 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.