summaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@codeaurora.org>2018-03-23 13:56:15 +0530
committerStephen Boyd <sboyd@kernel.org>2018-06-01 11:14:52 -0700
commit31543ebb8aff5efb53464d65221b3a1f7951e99c (patch)
treebc94b36363847dab154fcae40d09b140f9e25229 /drivers/clk/qcom
parentfb55bea1fe436b2b00a8bcc0bad69c76409270e8 (diff)
downloadop-kernel-dev-31543ebb8aff5efb53464d65221b3a1f7951e99c.zip
op-kernel-dev-31543ebb8aff5efb53464d65221b3a1f7951e99c.tar.gz
clk: qcom: Register the gdscs before the clocks
We have atleast some instances of ALWAYS_ON gdscs, which need to be turned ON *before* some clocks within the gdsc domain marked with a CLK_IS_CRITICAL can be turned ON. To facilitate this sequence, register the GDCSs (and hence handle the ALWAYS_ON gdscs) before we register clocks (and handle the clocks marked as CLK_IS_CRITICAL) Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/qcom')
-rw-r--r--drivers/clk/qcom/common.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index b8064a3..39ce64c 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -228,22 +228,6 @@ int qcom_cc_really_probe(struct platform_device *pdev,
if (!cc)
return -ENOMEM;
- cc->rclks = rclks;
- cc->num_rclks = num_clks;
-
- for (i = 0; i < num_clks; i++) {
- if (!rclks[i])
- continue;
-
- ret = devm_clk_register_regmap(dev, rclks[i]);
- if (ret)
- return ret;
- }
-
- ret = devm_of_clk_add_hw_provider(dev, qcom_cc_clk_hw_get, cc);
- if (ret)
- return ret;
-
reset = &cc->reset;
reset->rcdev.of_node = dev->of_node;
reset->rcdev.ops = &qcom_reset_ops;
@@ -272,6 +256,22 @@ int qcom_cc_really_probe(struct platform_device *pdev,
return ret;
}
+ cc->rclks = rclks;
+ cc->num_rclks = num_clks;
+
+ for (i = 0; i < num_clks; i++) {
+ if (!rclks[i])
+ continue;
+
+ ret = devm_clk_register_regmap(dev, rclks[i]);
+ if (ret)
+ return ret;
+ }
+
+ ret = devm_of_clk_add_hw_provider(dev, qcom_cc_clk_hw_get, cc);
+ if (ret)
+ return ret;
+
return 0;
}
EXPORT_SYMBOL_GPL(qcom_cc_really_probe);
OpenPOWER on IntegriCloud