aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>2019-01-28 19:32:55 +0100
committerKhasim Syed Mohammed <khasim.mohammed@linaro.org>2019-01-30 20:22:39 +0530
commit639f378dd047dc30d7d56b21facb9f00f09b3fe3 (patch)
tree6fb328367b4a7899afafc379006cec16d64a2335
parentaf188c2dd97e171714e4352046567780c53ce00c (diff)
FROMLIST: clk: qcom: hfpll: CLK_IGNORE_UNUSED
When COMMON_CLK_DISABLED_UNUSED is set, in an effort to save power and to keep the software model of the clock in line with reality, the framework transverses the clock tree and disables those clocks that were enabled by the firmware but have not been enabled by any device driver. If CPUFREQ is enabled, early during the system boot, it might attempt to change the CPU frequency ("set_rate"). If the HFPLL is selected as a provider, it will then change the rate for this clock. As boot continues, clk_disable_unused_subtree will run. Since it wont find a valid counter (enable_count) for a clock that is actually enabled it will attempt to disable it which will cause the CPU to stop. Notice that in this driver, calls to check whether the clock is enabled are routed via the is_enabled callback which queries the hardware. The following commit, rather than marking the clock critical and forcing the clock to be always enabled, addresses the above scenario making sure the clock is not disabled but it continues to rely on the firmware to enable the clock. am link: https://patchwork.kernel.org/patch/10784393/ Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@linaro.org>
-rw-r--r--drivers/clk/qcom/hfpll.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c
index 0ffed0d41c50..9d92f5df695b 100644
--- a/drivers/clk/qcom/hfpll.c
+++ b/drivers/clk/qcom/hfpll.c
@@ -58,6 +58,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
.parent_names = (const char *[]){ "xo" },
.num_parents = 1,
.ops = &clk_ops_hfpll,
+ .flags = CLK_IGNORE_UNUSED,
};
h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL);