diff options
author | Claudiu Beznea | 2020-09-07 17:46:35 +0300 |
---|---|---|
committer | Eugen Hristev | 2020-09-22 11:27:18 +0300 |
commit | 9a5d59dfc6475c4770bf702e4f30e338499310fd (patch) | |
tree | 7b29f10ea3731a74bdbfd8f8c183c33d0742106b /drivers | |
parent | 4d139f3838b4ee48d7df9ca9c37ccd1a57202a52 (diff) |
clk: do not disable clock if it is critical
Do not disable clock if it is a critical one.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/clk-uclass.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 5e0c8419d65..b8538f342a0 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -606,6 +606,9 @@ int clk_disable(struct clk *clk) if (CONFIG_IS_ENABLED(CLK_CCF)) { if (clk->id && !clk_get_by_id(clk->id, &clkp)) { + if (clkp->flags & CLK_IS_CRITICAL) + return 0; + if (clkp->enable_count == 0) { printf("clk %s already disabled\n", clkp->dev->name); |