Skip to content

Commit

Permalink
clk: ti: clkctrl: Fix clkdm_clk handling
Browse files Browse the repository at this point in the history
We need to always call clkdm_clk_enable() and clkdm_clk_disable() even
the clkctrl clock(s) enabled for the domain do not have any gate register
bits. Otherwise clockdomains may never get enabled except when devices get
probed with the legacy "ti,hwmods" devicetree property.

Fixes: 88a1725 ("clk: ti: add support for clkctrl clocks")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Tony Lindgren authored and Stephen Boyd committed May 21, 2019
1 parent b3fddd5 commit 1cc5407
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/clk/ti/clkctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ static int _omap4_clkctrl_clk_enable(struct clk_hw *hw)
int ret;
union omap4_timeout timeout = { 0 };

if (!clk->enable_bit)
return 0;

if (clk->clkdm) {
ret = ti_clk_ll_ops->clkdm_clk_enable(clk->clkdm, hw->clk);
if (ret) {
Expand All @@ -151,6 +148,9 @@ static int _omap4_clkctrl_clk_enable(struct clk_hw *hw)
}
}

if (!clk->enable_bit)
return 0;

val = ti_clk_ll_ops->clk_readl(&clk->enable_reg);

val &= ~OMAP4_MODULEMODE_MASK;
Expand Down Expand Up @@ -179,7 +179,7 @@ static void _omap4_clkctrl_clk_disable(struct clk_hw *hw)
union omap4_timeout timeout = { 0 };

if (!clk->enable_bit)
return;
goto exit;

val = ti_clk_ll_ops->clk_readl(&clk->enable_reg);

Expand Down

0 comments on commit 1cc5407

Please sign in to comment.