summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-06-12 17:32:32 +0800
committerYe.Li <B37916@freescale.com>2014-06-17 11:14:05 +0800
commit0e1c9ce73883ab684d10e381c807e69ce0ec7839 (patch)
tree15844b12fd49b2e95dd40d18c455b70ecdf9a983
parent42a8d227b508395ec370825aa100131917f2ceda (diff)
downloadu-boot-imx-0e1c9ce73883ab684d10e381c807e69ce0ec7839.zip
u-boot-imx-0e1c9ce73883ab684d10e381c807e69ce0ec7839.tar.gz
u-boot-imx-0e1c9ce73883ab684d10e381c807e69ce0ec7839.tar.bz2
ENGR00315894-73 iMX6SX:SABRESD/ARM2 Add "bmode" command support
Enable the "CONFIG_CMD_BMODE" and add BSP support. "bmode" supports to reboot: SD4, QSPI2 (SABRESD) SD2, SD3, eMMC, QSPI2, NAND, SPINOR (17x17 ARM2) SD1, QSPI2, SPINOR, EIMNOR (19x19 ARM2) BTW: Board rework is needed on ARM2 for NAND, SPINOR or EIMNOR boot. Signed-off-by: Ye.Li <B37916@freescale.com>
-rw-r--r--board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c18
-rw-r--r--board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c16
-rw-r--r--board/freescale/mx6sxsabresd/mx6sxsabresd.c13
-rw-r--r--include/configs/mx6sx_arm2.h2
-rw-r--r--include/configs/mx6sxsabresd.h2
5 files changed, 51 insertions, 0 deletions
diff --git a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c
index 6e90909..6a9788b 100644
--- a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c
+++ b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c
@@ -11,6 +11,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 <linux/sizes.h>
#include <common.h>
@@ -639,8 +640,25 @@ int board_init(void)
return 0;
}
+#ifdef CONFIG_CMD_BMODE
+static const struct boot_mode board_boot_modes[] = {
+ /* 4 bit bus width */
+ {"sd2", MAKE_CFGVAL(0x40, 0x28, 0x00, 0x00)},
+ {"sd3", MAKE_CFGVAL(0x40, 0x30, 0x00, 0x00)},
+ {"emmc", MAKE_CFGVAL(0x60, 0x38, 0x00, 0x00)},
+ {"qspi2", MAKE_CFGVAL(0x18, 0x00, 0x00, 0x00)},
+ {"spinor", MAKE_CFGVAL(0x30, 0x00, 0x00, 0x0B)},
+ {"nand", MAKE_CFGVAL(0x80, 0x00, 0x00, 0x00)},
+ {NULL, 0},
+};
+#endif
+
int board_late_init(void)
{
+#ifdef CONFIG_CMD_BMODE
+ add_board_boot_modes(board_boot_modes);
+#endif
+
#ifdef CONFIG_PFUZE100_PMIC_I2C
int ret = 0;
diff --git a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c
index 574f054..1e4f322 100644
--- a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c
+++ b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c
@@ -11,6 +11,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 <linux/sizes.h>
#include <common.h>
@@ -760,8 +761,23 @@ int board_init(void)
return 0;
}
+#ifdef CONFIG_CMD_BMODE
+static const struct boot_mode board_boot_modes[] = {
+ /* 4 bit bus width */
+ {"sd1", MAKE_CFGVAL(0x40, 0x20, 0x00, 0x00)},
+ {"qspi2", MAKE_CFGVAL(0x18, 0x00, 0x00, 0x00)},
+ {"spinor", MAKE_CFGVAL(0x30, 0x00, 0x00, 0x0B)},
+ {"eimnor", MAKE_CFGVAL(0x00, 0x80, 0x00, 0x00)},
+ {NULL, 0},
+};
+#endif
+
int board_late_init(void)
{
+#ifdef CONFIG_CMD_BMODE
+ add_board_boot_modes(board_boot_modes);
+#endif
+
#ifdef CONFIG_PFUZE100_PMIC_I2C
int ret = 0;
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 6a4311b..73f77b1 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -763,8 +763,21 @@ int board_init(void)
return 0;
}
+#ifdef CONFIG_CMD_BMODE
+static const struct boot_mode board_boot_modes[] = {
+ /* 4 bit bus width */
+ {"sd4", MAKE_CFGVAL(0x40, 0x38, 0x00, 0x00)},
+ {"qspi2", MAKE_CFGVAL(0x18, 0x00, 0x00, 0x00)},
+ {NULL, 0},
+};
+#endif
+
int board_late_init(void)
{
+#ifdef CONFIG_CMD_BMODE
+ add_board_boot_modes(board_boot_modes);
+#endif
+
#ifdef CONFIG_PFUZE100_PMIC_I2C
int ret = 0;
diff --git a/include/configs/mx6sx_arm2.h b/include/configs/mx6sx_arm2.h
index 1fd1d5f..6e9df51 100644
--- a/include/configs/mx6sx_arm2.h
+++ b/include/configs/mx6sx_arm2.h
@@ -409,6 +409,8 @@
#define CONFIG_OF_LIBFDT
#define CONFIG_CMD_BOOTZ
+#define CONFIG_CMD_BMODE
+
#ifndef CONFIG_SYS_DCACHE_OFF
#define CONFIG_CMD_CACHE
#endif
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index 1e9e2cc..23c83ec 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -330,6 +330,8 @@
#define CONFIG_OF_LIBFDT
#define CONFIG_CMD_BOOTZ
+#define CONFIG_CMD_BMODE
+
#ifndef CONFIG_SYS_DCACHE_OFF
#define CONFIG_CMD_CACHE
#endif