]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cpu: imx: fix the CPU frequency in cpu_imx_get_info()
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Thu, 1 Aug 2024 03:59:50 +0000 (11:59 +0800)
committerFabio Estevam <festevam@gmail.com>
Fri, 2 Aug 2024 18:16:51 +0000 (15:16 -0300)
The cpu_freq stores the current CPU frequency in Hz.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/cpu/imx8_cpu.c

index 4781a565547a15e032038fb49060666867ffbe44..601a7071a6448eba0e9b85bc1e9b53e4a0587397 100644 (file)
@@ -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;
 }