summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/omap-common/spl.c4
-rw-r--r--arch/arm/cpu/armv7/omap3/board.c5
-rw-r--r--arch/arm/include/asm/omap_common.h4
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c
index f72d389f3d..25f04edf11 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -116,6 +116,10 @@ void board_init_r(gd_t *id, ulong dummy)
timer_init();
+#ifdef CONFIG_SPL_BOARD_INIT
+ spl_board_init();
+#endif
+
boot_device = omap_boot_device();
debug("boot device - %d\n", boot_device);
switch (boot_device) {
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index cdf452dfbc..1f33c6398c 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -40,6 +40,7 @@
#include <asm/armv7.h>
#include <asm/arch/gpio.h>
#include <asm/omap_common.h>
+#include <i2c.h>
/* Declarations */
extern omap3_sysinfo sysinfo;
@@ -89,6 +90,10 @@ u32 omap_boot_device(void)
return omap3_boot_device;
}
+void spl_board_init(void)
+{
+ i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+}
#endif /* CONFIG_SPL_BUILD */
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index 913231b292..1ec651b353 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -94,6 +94,10 @@ void spl_nand_load_image(void);
/* MMC SPL functions */
void spl_mmc_load_image(void);
+#ifdef CONFIG_SPL_BOARD_INIT
+void spl_board_init(void);
+#endif
+
/*
* silicon revisions.
* Moving this to common, so that most of code can be moved to common,
OpenPOWER on IntegriCloud