aboutsummaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2012-04-30 08:12:03 +0000
committerJohn Rigby <john.rigby@linaro.org>2012-05-02 19:44:15 -0600
commit5bba013622b119b68411711f65ce4b105198d2f3 (patch)
tree7ce6c8bd57e6facc94be564d9c6393f6f2f074a4 /board/freescale
parent9b977cb408745db434a35592a2fdca161a6e27b0 (diff)
mx53loco: Allow to print CPU information at a later stage
Print CPU information within board_late_init(). This is in preparation for adding 1GHz support, which requires programming a PMIC via I2C. As I2C is only available after relocation, print the CPU information later at board_late_init(), so that the CPU frequency can be printed correctly. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mx53loco/mx53loco.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 7ea9f6ead..46aaeb215 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -299,6 +299,28 @@ 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)
+{
+ print_cpuinfo();
+ return 0;
+}
+#endif
+
int board_init(void)
{
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;