summaryrefslogtreecommitdiff
path: root/board/freescale/mx6qsabreauto/mx6qsabreauto.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2013-03-16 08:05:07 +0000
committerStefano Babic <sbabic@denx.de>2013-04-03 10:41:51 +0200
commit85449dbd4ba55766862eeb93745c1b4b76c5cd86 (patch)
tree2614b683c42d3b4ab33fd0aa50e4064b3565026c /board/freescale/mx6qsabreauto/mx6qsabreauto.c
parent60bb4621489d53aa255ccc35621a286a9a9b700d (diff)
downloadu-boot-imx-85449dbd4ba55766862eeb93745c1b4b76c5cd86.zip
u-boot-imx-85449dbd4ba55766862eeb93745c1b4b76c5cd86.tar.gz
u-boot-imx-85449dbd4ba55766862eeb93745c1b4b76c5cd86.tar.bz2
mx6qsabre{sd,auto}: Add boot mode select
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/freescale/mx6qsabreauto/mx6qsabreauto.c')
-rw-r--r--board/freescale/mx6qsabreauto/mx6qsabreauto.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 91cc007..aec3286 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -26,6 +26,7 @@
#include <asm/errno.h>
#include <asm/gpio.h>
#include <asm/imx-common/iomux-v3.h>
+#include <asm/imx-common/boot_mode.h>
#include <mmc.h>
#include <fsl_esdhc.h>
#include <miiphy.h>
@@ -216,6 +217,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, 0x30, 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 checkboard(void)
{
int rev = mx6sabre_rev();