clk: tegra: Mark APB clock as critical
authorJon Hunter <jonathanh@nvidia.com>
Mon, 23 Oct 2017 11:12:52 +0000 (12:12 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 1 Nov 2017 13:58:13 +0000 (14:58 +0100)
Currently, the APB clock is registered with the CLK_IGNORE_UNUSED flag
to prevent the clock from being disabled if unused on boot. However,
even if it is used, it still needs to be always kept enabled so that it
doesn't get inadvertently disabled when all of its children are, and so
update the flag for the APB clock to be CLK_IS_CRITICAL.

Suggested-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-By: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/clk/tegra/clk-tegra-super-gen4.c

index 4f6fd307cb706d2d38003203417a2a9adf70a92e..10047107c1dc39720275537b5dddb86db4438e6a 100644 (file)
@@ -166,7 +166,7 @@ static void __init tegra_sclk_init(void __iomem *clk_base,
                                   clk_base + SYSTEM_CLK_RATE, 0, 2, 0,
                                   &sysrate_lock);
        clk = clk_register_gate(NULL, "pclk", "pclk_div", CLK_SET_RATE_PARENT |
-                               CLK_IGNORE_UNUSED, clk_base + SYSTEM_CLK_RATE,
+                               CLK_IS_CRITICAL, clk_base + SYSTEM_CLK_RATE,
                                3, CLK_GATE_SET_TO_DISABLE, &sysrate_lock);
        *dt_clk = clk;
 }