summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2013-04-19 03:42:03 +0000
committerStefano Babic <sbabic@denx.de>2013-04-25 21:34:48 +0200
commiteaffaa2d25ce6e94a965460467352bd12513bf09 (patch)
treea9b7e0c9e542099d20722aebd77c0e4cd0e76551 /board
parent5ed15738d915b75b6a2bd9c3095005481c4df3d1 (diff)
downloadu-boot-imx-eaffaa2d25ce6e94a965460467352bd12513bf09.zip
u-boot-imx-eaffaa2d25ce6e94a965460467352bd12513bf09.tar.gz
u-boot-imx-eaffaa2d25ce6e94a965460467352bd12513bf09.tar.bz2
wandboard: Add boot selection support
Adds support for 'bmode' command which let user to choose where to boot from; this allows U-Boot to load system from another storage without messing with jumpers. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'board')
-rw-r--r--board/wandboard/wandboard.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 2bf121c..c71c90d 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -16,6 +16,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
#include <asm/imx-common/iomux-v3.h>
+#include <asm/imx-common/boot_mode.h>
#include <asm/io.h>
#include <asm/sizes.h>
#include <common.h>
@@ -225,6 +226,24 @@ int board_early_init_f(void)
return 0;
}
+#ifdef CONFIG_CMD_BMODE
+static const struct boot_mode board_boot_modes[] = {
+ /* 4 bit bus width */
+ {"mmc0", MAKE_CFGVAL(0x40, 0x30, 0x00, 0x00)},
+ {"mmc1", MAKE_CFGVAL(0x40, 0x20, 0x00, 0x00)},
+ {NULL, 0},
+};
+#endif
+
+int board_late_init(void)
+{
+#ifdef CONFIG_CMD_BMODE
+ add_board_boot_modes(board_boot_modes);
+#endif
+
+ return 0;
+}
+
int board_init(void)
{
/* address of boot parameters */