summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/omap-common/boot-common.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-09-30 23:49:17 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-09-30 23:49:17 +0200
commit1c27059a2f7158a9c9a8778535b030935d75179d (patch)
treebf577d5c9f0da21c5d57feed1091214e54c39dec /arch/arm/cpu/armv7/omap-common/boot-common.c
parent8f0732ac3dc3bdbbcada313dc4b4b38d5d2c376a (diff)
parent4668a086bb0a769b741e3a4ffab85f1c41c7cdb8 (diff)
downloadu-boot-imx-1c27059a2f7158a9c9a8778535b030935d75179d.zip
u-boot-imx-1c27059a2f7158a9c9a8778535b030935d75179d.tar.gz
u-boot-imx-1c27059a2f7158a9c9a8778535b030935d75179d.tar.bz2
Merge remote-tracking branch 'u-boot/master'
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common/boot-common.c')
-rw-r--r--arch/arm/cpu/armv7/omap-common/boot-common.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
index f211f76..0f19141 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -17,8 +17,10 @@
*/
#include <common.h>
+#include <spl.h>
#include <asm/omap_common.h>
#include <asm/arch/omap.h>
+#include <asm/arch/mmc_host_def.h>
/*
* This is used to verify if the configuration header
@@ -37,13 +39,34 @@ struct omap_boot_parameters boot_params __attribute__ ((section(".data")));
*/
u32 omap_bootmode = MMCSD_MODE_FAT;
-u32 omap_boot_device(void)
+u32 spl_boot_device(void)
{
return (u32) (boot_params.omap_bootdevice);
}
-u32 omap_boot_mode(void)
+u32 spl_boot_mode(void)
{
return omap_bootmode;
}
+
+void spl_board_init(void)
+{
+#ifdef CONFIG_SPL_NAND_SUPPORT
+ gpmc_init();
+#endif
+}
+
+int board_mmc_init(bd_t *bis)
+{
+ switch (spl_boot_device()) {
+ case BOOT_DEVICE_MMC1:
+ omap_mmc_init(0, 0, 0);
+ break;
+ case BOOT_DEVICE_MMC2:
+ case BOOT_DEVICE_MMC2_2:
+ omap_mmc_init(1, 0, 0);
+ break;
+ }
+ return 0;
+}
#endif