Skip to content

Commit 18a50f8

Browse files
nitingarg98abelvesa
authored andcommitted
clk: imx: scu: Do not enable runtime PM for CPU clks
Since CPU clocks are managed by CPUFREQ and ATF, do not enable runtime PM otherwise rpm gets out of status as cpufreq also manages clock states. Signed-off-by: Nitin Garg <[email protected]> Signed-off-by: Dong Aisheng <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Signed-off-by: Abel Vesa <[email protected]>
1 parent a82327c commit 18a50f8

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

drivers/clk/imx/clk-scu.c

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -521,16 +521,19 @@ static int imx_clk_scu_probe(struct platform_device *pdev)
521521
struct clk_hw *hw;
522522
int ret;
523523

524-
pm_runtime_set_suspended(dev);
525-
pm_runtime_set_autosuspend_delay(dev, 50);
526-
pm_runtime_use_autosuspend(&pdev->dev);
527-
pm_runtime_enable(dev);
528-
529-
ret = pm_runtime_get_sync(dev);
530-
if (ret) {
531-
pm_genpd_remove_device(dev);
532-
pm_runtime_disable(dev);
533-
return ret;
524+
if (!((clk->rsrc == IMX_SC_R_A35) || (clk->rsrc == IMX_SC_R_A53) ||
525+
(clk->rsrc == IMX_SC_R_A72))) {
526+
pm_runtime_set_suspended(dev);
527+
pm_runtime_set_autosuspend_delay(dev, 50);
528+
pm_runtime_use_autosuspend(&pdev->dev);
529+
pm_runtime_enable(dev);
530+
531+
ret = pm_runtime_get_sync(dev);
532+
if (ret) {
533+
pm_genpd_remove_device(dev);
534+
pm_runtime_disable(dev);
535+
return ret;
536+
}
534537
}
535538

536539
hw = __imx_clk_scu(dev, clk->name, clk->parents, clk->num_parents,
@@ -543,8 +546,11 @@ static int imx_clk_scu_probe(struct platform_device *pdev)
543546
clk->hw = hw;
544547
list_add_tail(&clk->node, &imx_scu_clks[clk->rsrc]);
545548

546-
pm_runtime_mark_last_busy(&pdev->dev);
547-
pm_runtime_put_autosuspend(&pdev->dev);
549+
if (!((clk->rsrc == IMX_SC_R_A35) || (clk->rsrc == IMX_SC_R_A53) ||
550+
(clk->rsrc == IMX_SC_R_A72))) {
551+
pm_runtime_mark_last_busy(&pdev->dev);
552+
pm_runtime_put_autosuspend(&pdev->dev);
553+
}
548554

549555
dev_dbg(dev, "register SCU clock rsrc:%d type:%d\n", clk->rsrc,
550556
clk->clk_type);

0 commit comments

Comments
 (0)