Skip to contentSkip to conversation

mx53loco: use print_cpuinfo() defined in imx-common

PATCH New Ashok 2 participants 3 messages Jun 23, 2012

lore
Share & tools
lore

Ashok

author
#0 lore raw

PATCH 1/1 mx53loco: use print_cpuinfo() defined in imx-common

use print_cpuinfo() defined in imx-common/cpu.c,
instead of duplicating function.

---
  board/freescale/mx53loco/mx53loco.c |   14 --------------
  include/configs/mx53loco.h          |    1 +
  2 files changed, 1 insertion(+), 14 deletions(-)
(quoted diff) +0 -0

b/board/freescale/mx53loco/mx53loco.c
index d8e027c..cc57bb3 100644

board/freescale/mx53loco/mx53loco.c +0 -14
@@ -478,20 +478,6 @@ int board_early_init_f(void)
  	return 0;
  }
 
-int print_cpuinfo(void)
-{
-	u32 cpurev;
-
-	cpurev = get_cpu_rev();
-	printf("CPU:   Freescale i.MX%x family rev%d.%d at %d MHz\n",
-		(cpurev & 0xFF000) >> 12,
-		(cpurev & 0x000F0) >> 4,
-		(cpurev & 0x0000F) >> 0,
-		mxc_get_clock(MXC_ARM_CLK) / 1000000);
-	printf("Reset cause: %s\n", get_reset_cause());
-	return 0;
-}
-
  #ifdef CONFIG_BOARD_LATE_INIT
  int board_late_init(void)
  {
include/configs/mx53loco.h +1 -0
index 8b4e008..29fa6b4 100644
@@ -28,6 +28,7 @@
  #define CONFIG_SYS_MX5_HCLK	24000000
  #define CONFIG_SYS_MX5_CLK32		32768
  #define CONFIG_DISPLAY_BOARDINFO
+#define CONFIG_DISPLAY_CPUINFO
 
  #define CONFIG_MACH_TYPE	MACH_TYPE_MX53_LOCO
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 mx53loco: use print_cpuinfo() defined in imx-common

Hi Ashok,

Quoted 2 lines · Ashok

use print_cpuinfo() defined in imx-common/cpu.c,
instead of duplicating function.

The reason for duplicating this function is that we cannot print the CPU info right in the beginning, because if we do so the frequency of 800MHz would be reported, instead of the 1GHz that is only set later via I2C commands to the PMIC.

So, please let the code as is to avoid wrong CPU frequency to be reported.

Regards,

Fabio Estevam

author
#2 lore raw

PATCH 1/1 mx53loco: use print_cpuinfo() defined in imx-common

Quoted 11 lines · Fabio Estevam

Hi Ashok,

Quoted 2 lines · Ashok

use print_cpuinfo() defined in imx-common/cpu.c,
instead of duplicating function.

The reason for duplicating this function is that we cannot print the CPU info right in the beginning, because if we do so the frequency of 800MHz would be reported, instead of the 1GHz that is only set later via I2C commands to the PMIC.

Quoted 6 lines

So, please let the code as is to avoid wrong CPU frequency to be reported.

Regards,

Fabio Estevam

Hi Fabio,

Thanks for the information.

Regards,
Ashok