[PATCH 05/22] clk: do not disable clock if it is critical
Claudiu Beznea
claudiu.beznea at microchip.com
Wed Jul 29 16:51:24 CEST 2020
Do not disable clock if it is a critical one.
Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
---
drivers/clk/clk-uclass.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index b390a6b01c06..958a9490bee2 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -605,6 +605,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);
--
2.7.4
More information about the U-Boot
mailing list