Skip to content

Commit 7b20a4f

Browse files
Leo-YanSuzuki K Poulose
authored andcommitted
coresight: Make clock sequence consistent
Since atclk is enabled after pclk during the probe phase, this commit maintains the same sequence for the runtime resume flow. Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com> Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20250731-arm_cs_fix_clock_v4-v6-9-1dfe10bb3f6f@arm.com
1 parent ba6b61f commit 7b20a4f

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

drivers/hwtracing/coresight/coresight-funnel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,11 @@ static int funnel_runtime_resume(struct device *dev)
297297
{
298298
struct funnel_drvdata *drvdata = dev_get_drvdata(dev);
299299

300-
if (drvdata && !IS_ERR(drvdata->atclk))
301-
clk_prepare_enable(drvdata->atclk);
302-
303300
if (drvdata && !IS_ERR_OR_NULL(drvdata->pclk))
304301
clk_prepare_enable(drvdata->pclk);
302+
303+
if (drvdata && !IS_ERR(drvdata->atclk))
304+
clk_prepare_enable(drvdata->atclk);
305305
return 0;
306306
}
307307
#endif

drivers/hwtracing/coresight/coresight-replicator.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,11 @@ static int replicator_runtime_resume(struct device *dev)
335335
{
336336
struct replicator_drvdata *drvdata = dev_get_drvdata(dev);
337337

338-
if (drvdata && !IS_ERR(drvdata->atclk))
339-
clk_prepare_enable(drvdata->atclk);
340-
341338
if (drvdata && !IS_ERR_OR_NULL(drvdata->pclk))
342339
clk_prepare_enable(drvdata->pclk);
340+
341+
if (drvdata && !IS_ERR(drvdata->atclk))
342+
clk_prepare_enable(drvdata->atclk);
343343
return 0;
344344
}
345345
#endif

drivers/hwtracing/coresight/coresight-stm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,11 @@ static int stm_runtime_resume(struct device *dev)
969969
{
970970
struct stm_drvdata *drvdata = dev_get_drvdata(dev);
971971

972-
if (drvdata && !IS_ERR(drvdata->atclk))
973-
clk_prepare_enable(drvdata->atclk);
974-
975972
if (drvdata && !IS_ERR_OR_NULL(drvdata->pclk))
976973
clk_prepare_enable(drvdata->pclk);
974+
975+
if (drvdata && !IS_ERR(drvdata->atclk))
976+
clk_prepare_enable(drvdata->atclk);
977977
return 0;
978978
}
979979
#endif

drivers/hwtracing/coresight/coresight-tpiu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ static int tpiu_runtime_resume(struct device *dev)
218218
{
219219
struct tpiu_drvdata *drvdata = dev_get_drvdata(dev);
220220

221-
if (drvdata && !IS_ERR(drvdata->atclk))
222-
clk_prepare_enable(drvdata->atclk);
223-
224221
if (drvdata && !IS_ERR_OR_NULL(drvdata->pclk))
225222
clk_prepare_enable(drvdata->pclk);
223+
224+
if (drvdata && !IS_ERR(drvdata->atclk))
225+
clk_prepare_enable(drvdata->atclk);
226226
return 0;
227227
}
228228
#endif

0 commit comments

Comments
 (0)