* [PATCH] clk: ti: clkctrl: Fix clkdm_clk handling
@ 2019-05-06 21:08 Tony Lindgren
2019-05-21 18:54 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2019-05-06 21:08 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Tero Kristo
Cc: devicetree, linux-clk, linux-omap
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>
---
drivers/clk/ti/clkctrl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c
--- a/drivers/clk/ti/clkctrl.c
+++ b/drivers/clk/ti/clkctrl.c
@@ -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) {
@@ -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;
@@ -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);
--
2.21.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: ti: clkctrl: Fix clkdm_clk handling
2019-05-06 21:08 [PATCH] clk: ti: clkctrl: Fix clkdm_clk handling Tony Lindgren
@ 2019-05-21 18:54 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2019-05-21 18:54 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Tero Kristo, Tony Lindgren
Cc: devicetree, linux-clk, linux-omap
Quoting Tony Lindgren (2019-05-06 14:08:54)
> 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>
> ---
Applied to clk-fixes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-21 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-06 21:08 [PATCH] clk: ti: clkctrl: Fix clkdm_clk handling Tony Lindgren
2019-05-21 18:54 ` Stephen Boyd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.