]> git.sur5r.net Git - u-boot/commitdiff
mx53evk: add boot_mode support
authorTroy Kisky <troy.kisky@boundarydevices.com>
Wed, 15 Aug 2012 10:31:22 +0000 (10:31 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 1 Sep 2012 12:58:26 +0000 (14:58 +0200)
This allows a watchdog reset to start the ROM's
usb/serial downloader, or boot from an sdcard.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
board/freescale/mx53evk/mx53evk.c
include/configs/mx53evk.h

index 8a6e31d9b100036b18107deaf76fdba14ce73537..7f509383071f2357fbcefe70294c2a80be9b9d8e 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/errno.h>
+#include <asm/imx-common/boot_mode.h>
 #include <netdev.h>
 #include <i2c.h>
 #include <mmc.h>
@@ -367,11 +368,23 @@ int board_init(void)
        return 0;
 }
 
+#ifdef CONFIG_CMD_BMODE
+static const struct boot_mode board_boot_modes[] = {
+       /* 4 bit bus width */
+       {"mmc0",        MAKE_CFGVAL(0x40, 0x20, 0x00, 0x12)},
+       {"mmc1",        MAKE_CFGVAL(0x40, 0x20, 0x08, 0x12)},
+       {NULL,          0},
+};
+#endif
+
 int board_late_init(void)
 {
        setup_i2c(1);
        power_init();
 
+#ifdef CONFIG_CMD_BMODE
+       add_board_boot_modes(board_boot_modes);
+#endif
        return 0;
 }
 
index 0a7983306d075cb075bd3e8d8baaa8429b231b4e..b46855f7e426d6479e5737a39eef4e3d698eb97f 100644 (file)
@@ -88,6 +88,9 @@
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_DATE
 
+/* Miscellaneous commands */
+#define CONFIG_CMD_BMODE
+
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_CONS_INDEX              1