linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops
@ 2021-07-17 11:27 Dmitry Osipenko
  2021-07-22 19:06 ` Dmitry Osipenko
  2021-07-27 21:54 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2021-07-17 11:27 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Peter De Schrijver,
	Prashant Gaikwad, Michael Turquette, Stephen Boyd
  Cc: linux-tegra, linux-clk, linux-kernel

Implement disable_unused() callback of tegra_clk_sdmmc_mux_ops to fix
imbalanced disabling of the unused MMC clock on Tegra210 Jetson Nano.

Fixes: c592c8a28f58 ("clk: tegra: Fix refcounting of gate clocks")
Reported-by: Jon Hunter <jonathanh@nvidia.com> # T210 Nano
Tested-by: Jon Hunter <jonathanh@nvidia.com> # T210 Nano
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/clk/tegra/clk-sdmmc-mux.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/clk/tegra/clk-sdmmc-mux.c b/drivers/clk/tegra/clk-sdmmc-mux.c
index 316912d3b1a4..4f2c3309eea4 100644
--- a/drivers/clk/tegra/clk-sdmmc-mux.c
+++ b/drivers/clk/tegra/clk-sdmmc-mux.c
@@ -194,6 +194,15 @@ static void clk_sdmmc_mux_disable(struct clk_hw *hw)
 	gate_ops->disable(gate_hw);
 }
 
+static void clk_sdmmc_mux_disable_unused(struct clk_hw *hw)
+{
+	struct tegra_sdmmc_mux *sdmmc_mux = to_clk_sdmmc_mux(hw);
+	const struct clk_ops *gate_ops = sdmmc_mux->gate_ops;
+	struct clk_hw *gate_hw = &sdmmc_mux->gate.hw;
+
+	gate_ops->disable_unused(gate_hw);
+}
+
 static void clk_sdmmc_mux_restore_context(struct clk_hw *hw)
 {
 	struct clk_hw *parent = clk_hw_get_parent(hw);
@@ -218,6 +227,7 @@ static const struct clk_ops tegra_clk_sdmmc_mux_ops = {
 	.is_enabled = clk_sdmmc_mux_is_enabled,
 	.enable = clk_sdmmc_mux_enable,
 	.disable = clk_sdmmc_mux_disable,
+	.disable_unused = clk_sdmmc_mux_disable_unused,
 	.restore_context = clk_sdmmc_mux_restore_context,
 };
 
-- 
2.32.0


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

* Re: [PATCH v1] clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops
  2021-07-17 11:27 [PATCH v1] clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops Dmitry Osipenko
@ 2021-07-22 19:06 ` Dmitry Osipenko
  2021-07-27 21:54 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2021-07-22 19:06 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-tegra, linux-clk, linux-kernel, Thierry Reding,
	Jonathan Hunter, Peter De Schrijver, Prashant Gaikwad,
	Michael Turquette

17.07.2021 14:27, Dmitry Osipenko пишет:
> Implement disable_unused() callback of tegra_clk_sdmmc_mux_ops to fix
> imbalanced disabling of the unused MMC clock on Tegra210 Jetson Nano.
> 
> Fixes: c592c8a28f58 ("clk: tegra: Fix refcounting of gate clocks")
> Reported-by: Jon Hunter <jonathanh@nvidia.com> # T210 Nano
> Tested-by: Jon Hunter <jonathanh@nvidia.com> # T210 Nano
> Acked-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---

Stephen, please feel free to take this patch for the rc3 fixes.

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

* Re: [PATCH v1] clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops
  2021-07-17 11:27 [PATCH v1] clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops Dmitry Osipenko
  2021-07-22 19:06 ` Dmitry Osipenko
@ 2021-07-27 21:54 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2021-07-27 21:54 UTC (permalink / raw)
  To: Dmitry Osipenko, Jonathan Hunter, Michael Turquette,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding
  Cc: linux-tegra, linux-clk, linux-kernel

Quoting Dmitry Osipenko (2021-07-17 04:27:42)
> Implement disable_unused() callback of tegra_clk_sdmmc_mux_ops to fix
> imbalanced disabling of the unused MMC clock on Tegra210 Jetson Nano.
> 
> Fixes: c592c8a28f58 ("clk: tegra: Fix refcounting of gate clocks")
> Reported-by: Jon Hunter <jonathanh@nvidia.com> # T210 Nano
> Tested-by: Jon Hunter <jonathanh@nvidia.com> # T210 Nano
> Acked-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---

Applied to clk-fixes

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

end of thread, other threads:[~2021-07-27 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17 11:27 [PATCH v1] clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops Dmitry Osipenko
2021-07-22 19:06 ` Dmitry Osipenko
2021-07-27 21:54 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).