Skip to content

Commit f9f87f0

Browse files
committed
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: c592c8a ("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>
1 parent 4c70ffe commit f9f87f0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/clk/tegra/clk-sdmmc-mux.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ static void clk_sdmmc_mux_disable(struct clk_hw *hw)
194194
gate_ops->disable(gate_hw);
195195
}
196196

197+
static void clk_sdmmc_mux_disable_unused(struct clk_hw *hw)
198+
{
199+
struct tegra_sdmmc_mux *sdmmc_mux = to_clk_sdmmc_mux(hw);
200+
const struct clk_ops *gate_ops = sdmmc_mux->gate_ops;
201+
struct clk_hw *gate_hw = &sdmmc_mux->gate.hw;
202+
203+
gate_ops->disable_unused(gate_hw);
204+
}
205+
197206
static void clk_sdmmc_mux_restore_context(struct clk_hw *hw)
198207
{
199208
struct clk_hw *parent = clk_hw_get_parent(hw);
@@ -218,6 +227,7 @@ static const struct clk_ops tegra_clk_sdmmc_mux_ops = {
218227
.is_enabled = clk_sdmmc_mux_is_enabled,
219228
.enable = clk_sdmmc_mux_enable,
220229
.disable = clk_sdmmc_mux_disable,
230+
.disable_unused = clk_sdmmc_mux_disable_unused,
221231
.restore_context = clk_sdmmc_mux_restore_context,
222232
};
223233

0 commit comments

Comments
 (0)