mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
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>
This commit is contained in:
parent
fb55bea1fe
commit
31543ebb8a
1 changed files with 16 additions and 16 deletions
|
@ -228,22 +228,6 @@ int qcom_cc_really_probe(struct platform_device *pdev,
|
||||||
if (!cc)
|
if (!cc)
|
||||||
return -ENOMEM;
|
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 = &cc->reset;
|
||||||
reset->rcdev.of_node = dev->of_node;
|
reset->rcdev.of_node = dev->of_node;
|
||||||
reset->rcdev.ops = &qcom_reset_ops;
|
reset->rcdev.ops = &qcom_reset_ops;
|
||||||
|
@ -272,6 +256,22 @@ int qcom_cc_really_probe(struct platform_device *pdev,
|
||||||
return ret;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(qcom_cc_really_probe);
|
EXPORT_SYMBOL_GPL(qcom_cc_really_probe);
|
||||||
|
|
Loading…
Add table
Reference in a new issue