diff options
author | Marcel Ziswiler <marcel@ziswiler.com> | 2019-05-31 19:00:18 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-06-11 10:42:48 +0200 |
commit | 1da39d3ce89cd5c43e22f0a18f969093b6f41450 (patch) | |
tree | ee507dea6f9b73ce9ad9510f5084f5879600ec50 /arch/arm/mach-imx | |
parent | 16f8b84917698ddc607a84daf36c473bda0676cf (diff) |
imx8qm: fix cpu frequency reporting
CPU frequency reporting failed with the following error message being
printed:
sc_pm_get_clock_rate: resource:507 clk:2: res:3
Could not read CPU frequency: -22
CPU: NXP i.MX8QM RevB A53 at 0 MHz
Fix this by differentiating between the A35 as found on the i.MX 8QXP
and the A53 as found on the i.MX 8QM SoCs.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/imx8/cpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index 53f9a8735a..aa78444d8f 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -623,8 +623,10 @@ static ulong imx8_get_cpu_rate(void) { ulong rate; int ret; + int type = is_cortex_a35() ? SC_R_A35 : is_cortex_a53() ? + SC_R_A53 : SC_R_A72; - ret = sc_pm_get_clock_rate(-1, SC_R_A35, SC_PM_CLK_CPU, + ret = sc_pm_get_clock_rate(-1, type, SC_PM_CLK_CPU, (sc_pm_clock_rate_t *)&rate); if (ret) { printf("Could not read CPU frequency: %d\n", ret); |