diff mbox series

[PATCHv4,05/14] cpu: imx: fix the CPU frequency in cpu_imx_get_info()

Message ID 20240730073003.28892-6-Zhiqiang.Hou@nxp.com
State Superseded
Delegated to: Fabio Estevam
Headers show
Series Add a subcommand 'release' to cmd/cpu.c | expand

Commit Message

Z.Q. Hou July 30, 2024, 7:29 a.m. UTC
From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

The cpu_freq stores the current CPU frequency in Hz.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
V4:
 - Rewrote the change log.

 drivers/cpu/imx8_cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Nazzareno Trimarchi July 30, 2024, 7:13 a.m. UTC | #1
Hi

On Tue, Jul 30, 2024 at 9:10 AM Zhiqiang Hou <Zhiqiang.Hou@nxp.com> wrote:
>
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>
> The cpu_freq stores the current CPU frequency in Hz.
>
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> ---
> V4:
>  - Rewrote the change log.
>
>  drivers/cpu/imx8_cpu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
> index 4781a56554..601a7071a6 100644
> --- a/drivers/cpu/imx8_cpu.c
> +++ b/drivers/cpu/imx8_cpu.c
> @@ -1,6 +1,6 @@
>  // SPDX-License-Identifier: GPL-2.0+
>  /*
> - * Copyright 2019 NXP
> + * Copyright 2019, 2024 NXP
>   */
>
>  #include <cpu.h>
> @@ -193,7 +193,7 @@ static int cpu_imx_get_info(const struct udevice *dev, struct cpu_info *info)
>  {
>         struct cpu_imx_plat *plat = dev_get_plat(dev);
>
> -       info->cpu_freq = plat->freq_mhz * 1000;
> +       info->cpu_freq = plat->freq_mhz * 1000000;
>         info->features = BIT(CPU_FEAT_L1_CACHE) | BIT(CPU_FEAT_MMU);

Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>


>         return 0;
>  }
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 4781a56554..601a7071a6 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -1,6 +1,6 @@ 
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2019 NXP
+ * Copyright 2019, 2024 NXP
  */
 
 #include <cpu.h>
@@ -193,7 +193,7 @@  static int cpu_imx_get_info(const struct udevice *dev, struct cpu_info *info)
 {
 	struct cpu_imx_plat *plat = dev_get_plat(dev);
 
-	info->cpu_freq = plat->freq_mhz * 1000;
+	info->cpu_freq = plat->freq_mhz * 1000000;
 	info->features = BIT(CPU_FEAT_L1_CACHE) | BIT(CPU_FEAT_MMU);
 	return 0;
 }