Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: ti: clkctrl: Fix clkdm_clk handling

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: 88a172526c32 ("clk: ti: add support for clkctrl clocks")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Tony Lindgren and committed by
Stephen Boyd
1cc54078 b3fddd5b

+4 -4
+4 -4
drivers/clk/ti/clkctrl.c
··· 137 137 int ret; 138 138 union omap4_timeout timeout = { 0 }; 139 139 140 - if (!clk->enable_bit) 141 - return 0; 142 - 143 140 if (clk->clkdm) { 144 141 ret = ti_clk_ll_ops->clkdm_clk_enable(clk->clkdm, hw->clk); 145 142 if (ret) { ··· 147 150 return ret; 148 151 } 149 152 } 153 + 154 + if (!clk->enable_bit) 155 + return 0; 150 156 151 157 val = ti_clk_ll_ops->clk_readl(&clk->enable_reg); 152 158 ··· 179 179 union omap4_timeout timeout = { 0 }; 180 180 181 181 if (!clk->enable_bit) 182 - return; 182 + goto exit; 183 183 184 184 val = ti_clk_ll_ops->clk_readl(&clk->enable_reg); 185 185