summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-02-24 11:29:59 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-25 09:21:46 +0100
commitca18a9ebf0d6e8be8bebb93957de1d86917910a0 (patch)
tree93e9293bd158fba924710b7884a23a9773175ac3 /drivers
parent9044ad7c2cf78a2963c9ddc3c4b9bf2054f46e95 (diff)
downloadbarebox-ca18a9ebf0d6e8be8bebb93957de1d86917910a0.tar.gz
clk: initially enable critical clocks
Critical clocks have to be enabled initially. We have to do this not only to enable the clock itself, but also to make sure its parents stay enabled and also to correctly enable the new parents during reparenting of the clock. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/clk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ea3304b..05bc21a 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -282,6 +282,9 @@ int clk_register(struct clk *clk)
list_add_tail(&clk->list, &clks);
+ if (clk->flags & CLK_IS_CRITICAL)
+ clk_enable(clk);
+
return 0;
}