]> git.sur5r.net Git - u-boot/commitdiff
mx6qsabrelite: add boot_mode support
authorTroy Kisky <troy.kisky@boundarydevices.com>
Wed, 15 Aug 2012 10:31:21 +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 downloader, or boot from an sdcard.

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

index a1e3accb36fbcf7f0cca6aa7f194717c6f74ca13..cb855975beb00f62f852186de9bfe2532baa5c1c 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/gpio.h>
 #include <asm/imx-common/iomux-v3.h>
 #include <asm/imx-common/mxc_i2c.h>
+#include <asm/imx-common/boot_mode.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <micrel.h>
@@ -488,10 +489,23 @@ static void preboot_keys(void)
 }
 #endif
 
+#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, 0x38, 0x00, 0x00)},
+       {NULL,          0},
+};
+#endif
+
 int misc_init_r(void)
 {
 #ifdef CONFIG_PREBOOT
        preboot_keys();
 #endif
+
+#ifdef CONFIG_CMD_BMODE
+       add_board_boot_modes(board_boot_modes);
+#endif
        return 0;
 }
index 4a6aafa546eb68582606428adeb0c88240a21c28..8cd9a631c159776f163e2250b0fedcb82648658e 100644 (file)
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS   0
 
+/* Miscellaneous commands */
+#define CONFIG_CMD_BMODE
+
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_CONS_INDEX             1