Skip to contentSkip to conversation

clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops

PATCH Applied Dmitry Osipenko 2 participants 3 messages Jul 17, 2021 – Jul 27, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops

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")
---
 drivers/clk/tegra/clk-sdmmc-mux.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/clk/tegra/clk-sdmmc-mux.c +10 -0
index 316912d3b1a4..4f2c3309eea4 100644
@@ -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,
 };
 
Signature · 1 line
2.32.0
#1 lore raw

17.07.2021 14:27, Dmitry Osipenko пишет:

Quoted 9 lines

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")

---

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

maintainer Applied
#2 lore raw
In reply to Dmitry Osipenko

Quoting Dmitry Osipenko (2021-07-17 04:27:42)

Quoted 9 lines

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")

---

Applied to clk-fixes