Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <nitin.garg@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

authored by

Nitin Garg and committed by
Abel Vesa
18a50f82 a82327cc

+17 -11
+17 -11
drivers/clk/imx/clk-scu.c
··· 521 521 struct clk_hw *hw; 522 522 int ret; 523 523 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); 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); 528 530 529 - ret = pm_runtime_get_sync(dev); 530 - if (ret) { 531 - pm_genpd_remove_device(dev); 532 - pm_runtime_disable(dev); 533 - return ret; 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 + } 534 537 } 535 538 536 539 hw = __imx_clk_scu(dev, clk->name, clk->parents, clk->num_parents, ··· 546 543 clk->hw = hw; 547 544 list_add_tail(&clk->node, &imx_scu_clks[clk->rsrc]); 548 545 549 - pm_runtime_mark_last_busy(&pdev->dev); 550 - pm_runtime_put_autosuspend(&pdev->dev); 546 + if (!((clk->rsrc == IMX_SC_R_A35) || (clk->rsrc == IMX_SC_R_A53) || 547 + (clk->rsrc == IMX_SC_R_A72))) { 548 + pm_runtime_mark_last_busy(&pdev->dev); 549 + pm_runtime_put_autosuspend(&pdev->dev); 550 + } 551 551 552 552 dev_dbg(dev, "register SCU clock rsrc:%d type:%d\n", clk->rsrc, 553 553 clk->clk_type);