summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-03-11 08:40:42 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-11 09:53:14 +0100
commit1ae7f310d101e2bbba8d0fc80b582aee5e39ab8f (patch)
tree11e540686ed9532d7e83bf06ff016b896062ad1d /drivers
parent90f70a9825919037729c20ab3c5e8b30d08fe9de (diff)
downloadbarebox-1ae7f310d101e2bbba8d0fc80b582aee5e39ab8f.tar.gz
clk: Support CLK_IS_CRITICAL flag
Support CLK_IS_CRITICAL flag. Simply do not disable the clock even when the enable count is zero. 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 6a2d8ad..ea3304b 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -87,6 +87,9 @@ void clk_disable(struct clk *clk)
clk->enable_count--;
if (!clk->enable_count) {
+ if (clk->flags & CLK_IS_CRITICAL)
+ return;
+
if (clk->ops->disable)
clk->ops->disable(clk);