clk: qcom: lpasscc-sc7280: fix missing resume during probe
commit 66af5339d4f8e20c6d89a490570bd94d40f1a7f6 upstream.
Drivers that enable runtime PM must make sure that the controller is
runtime resumed before accessing its registers to prevent the power
domain from being disabled.
Fixes: 4ab43d1711
("clk: qcom: Add lpass clock controller driver for SC7280")
Cc: stable@vger.kernel.org # 5.16
Cc: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230718132902.21430-6-johan+linaro@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5310f71215
commit
eab2ece5e4
@ -115,9 +115,13 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
|
||||
ret = pm_clk_add(&pdev->dev, "iface");
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to acquire iface clock\n");
|
||||
goto destroy_pm_clk;
|
||||
goto err_destroy_pm_clk;
|
||||
}
|
||||
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret)
|
||||
goto err_destroy_pm_clk;
|
||||
|
||||
if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode")) {
|
||||
lpass_regmap_config.name = "qdsp6ss";
|
||||
lpass_regmap_config.max_register = 0x3f;
|
||||
@ -125,7 +129,7 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
|
||||
|
||||
ret = qcom_cc_probe_by_index(pdev, 0, desc);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
goto err_put_rpm;
|
||||
}
|
||||
|
||||
lpass_regmap_config.name = "top_cc";
|
||||
@ -134,11 +138,15 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
|
||||
|
||||
ret = qcom_cc_probe_by_index(pdev, 1, desc);
|
||||
if (ret)
|
||||
goto destroy_pm_clk;
|
||||
goto err_put_rpm;
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
destroy_pm_clk:
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
err_destroy_pm_clk:
|
||||
pm_clk_destroy(&pdev->dev);
|
||||
|
||||
disable_pm_runtime:
|
||||
|
Loading…
Reference in New Issue
Block a user