[U-Boot] [PATCH 4/6] am33xx: Add am33xx_spl_board_init function, call

Tom Rini trini at ti.com
Fri Jul 19 21:00:24 CEST 2013


We need to allow for a further call-out in spl_board_init.  Call this
am33xx_spl_board_init and add a __weak version.  This function may be
used to scale the MPU frequency up, depending on board needs.

Signed-off-by: Tom Rini <trini at ti.com>
---
 arch/arm/cpu/armv7/omap-common/boot-common.c |   12 ++++++++++++
 arch/arm/include/asm/arch-am33xx/sys_proto.h |    1 +
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
index 76ae1b6..bf11f04 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -22,6 +22,7 @@
 #include <asm/arch/omap.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -75,6 +76,14 @@ u32 spl_boot_mode(void)
 	return gd->arch.omap_boot_params.omap_bootmode;
 }
 
+/*
+ * This function is the place to do per-board things such as ramp up the
+ * MPU clock frequency.
+ */
+__weak void am33xx_spl_board_init(void)
+{
+}
+
 void spl_board_init(void)
 {
 #ifdef CONFIG_SPL_NAND_SUPPORT
@@ -83,6 +92,9 @@ void spl_board_init(void)
 #if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW_SUPPORT)
 	arch_misc_init();
 #endif
+#ifdef CONFIG_AM33XX
+	am33xx_spl_board_init();
+#endif
 }
 
 int board_mmc_init(bd_t *bis)
diff --git a/arch/arm/include/asm/arch-am33xx/sys_proto.h b/arch/arm/include/asm/arch-am33xx/sys_proto.h
index 307ac28..98dc830 100644
--- a/arch/arm/include/asm/arch-am33xx/sys_proto.h
+++ b/arch/arm/include/asm/arch-am33xx/sys_proto.h
@@ -45,4 +45,5 @@ void omap_nand_switch_ecc(uint32_t, uint32_t);
 
 void rtc32k_enable(void);
 void uart_soft_reset(void);
+void am33xx_spl_board_init(void);
 #endif
-- 
1.7.9.5



More information about the U-Boot mailing list