From: Max Krummenacher <max.krummenacher@toradex.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] imx8qm: fix cpu frequency reporting
Date: Wed, 01 May 2019 16:18:33 +0200 [thread overview]
Message-ID: <1556720313.1765.39.camel@toradex.com> (raw)
In-Reply-To: <20190430100629.9212-5-marcel@ziswiler.com>
See review comment below.
With the issue resolved:
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
On Tue, 2019-04-30 at 12:06 +0200, Marcel Ziswiler wrote:
> 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>
>
> ---
>
> arch/arm/mach-imx/imx8/cpu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
> index 12716e7e9e..0d01e3fc3b 100644
> --- a/arch/arm/mach-imx/imx8/cpu.c
> +++ b/arch/arm/mach-imx/imx8/cpu.c
> @@ -654,8 +654,9 @@ static ulong imx8_get_cpu_rate(void)
> {
> ulong rate;
> int ret;
> + int type = is_cortex_a35() ? SC_R_A35 : SC_R_A53;
The related get_core_name() below foresees that the code could run on
a cortex_a72. So we should here also test with is_cortex_a72 and then
use SC_R_A72 to avoid a follow-up patch for a future i.MX8 SKU or changed
configuration.
Regards,
Max
>
> - 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);
next prev parent reply other threads:[~2019-05-01 14:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 10:06 [U-Boot] [PATCH 0/6] apalis imx8qm 4gb wb it v1.0b module support Marcel Ziswiler
2019-04-30 10:06 ` [U-Boot] [PATCH 1/6] arm: dts: imx8qm: add lpuart1, lpuart2, lpuart3, lpuart4 Marcel Ziswiler
2019-05-01 14:18 ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 2/6] arm: dts: imx8qm: add support for i2c0, i2c1, i2c2, i2c3 and i2c4 Marcel Ziswiler
2019-05-01 14:18 ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 3/6] clk: imx8qm: fix usdhc2 clocks Marcel Ziswiler
2019-05-01 14:18 ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 4/6] imx8qm: fix cpu frequency reporting Marcel Ziswiler
2019-05-01 14:18 ` Max Krummenacher [this message]
2019-04-30 10:06 ` [U-Boot] [PATCH 5/6] imx8: fuse: fix fuse driver Marcel Ziswiler
2019-05-01 14:18 ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 6/6] board: toradex: add apalis imx8qm 4gb wb it v1.0b module support Marcel Ziswiler
2019-05-01 14:19 ` Max Krummenacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1556720313.1765.39.camel@toradex.com \
--to=max.krummenacher@toradex.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox