diff options
author | Ye.Li <B37916@freescale.com> | 2014-02-24 16:07:44 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2014-02-25 15:46:16 +0800 |
commit | 7f789db44b3d5bcdf0aa4952f724701aa90e5fc1 (patch) | |
tree | bdfcd2e85da6e86e72c7a01d046d2ae71aa42379 /include/configs | |
parent | e2ced39867a3001390bd23069e56b513ed268bb0 (diff) | |
download | u-boot-imx-7f789db44b3d5bcdf0aa4952f724701aa90e5fc1.zip u-boot-imx-7f789db44b3d5bcdf0aa4952f724701aa90e5fc1.tar.gz u-boot-imx-7f789db44b3d5bcdf0aa4952f724701aa90e5fc1.tar.bz2 |
ENGR00299848 ARM:imx6 Change static environment SD/MMC storage to dynamic
imx6 boards (sabresd, sabreauto, arm2 and slevk) have multiple SD/MMC ports to boot.
But current uboot hard code the SD/MMC port for environment variables storage. So
if customer changes a port without modifying the configuration "CONFIG_SYS_MMC_ENV_DEV",
error will issue at saving and loading environment.
Implement a mechanism to detect SD/MMC port from SRC SMBR register, and override the
default "mmc_get_env_devno". The "board_late_mmc_env_init" is used to set "mmcdev"
when booting from SD/MMC port. Finally after booting from SD/MMC, the environment storage
device and "mmcdev" are both set to current SD/MMC port. Customers don't need to re-build
the image if booting from different SD/MMC port.
This patch also adds SD1 and SD3 support to imx6slevk BSP, and adds support for sabreauto
SD1 slot on base board.
Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'include/configs')
-rw-r--r-- | include/configs/mx6qarm2.h | 3 | ||||
-rw-r--r-- | include/configs/mx6qsabreauto.h | 2 | ||||
-rw-r--r-- | include/configs/mx6slevk.h | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h index 22f39e8..11f6861 100644 --- a/include/configs/mx6qarm2.h +++ b/include/configs/mx6qarm2.h @@ -51,6 +51,7 @@ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO #define CONFIG_MXC_UART @@ -182,7 +183,7 @@ /* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_OFFSET (6 * 64 * 1024) +#define CONFIG_ENV_OFFSET (8 * 64 * 1024) #define CONFIG_ENV_SIZE (8 * 1024) #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1 diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h index 3a078af..43be4da 100644 --- a/include/configs/mx6qsabreauto.h +++ b/include/configs/mx6qsabreauto.h @@ -46,7 +46,7 @@ #endif #define CONFIG_SYS_FSL_USDHC_NUM 2 -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SYS_MMC_ENV_PART 0 /* user partition */ #ifdef CONFIG_SYS_USE_SPINOR diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index 060e8f1..aad4615 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -61,6 +61,7 @@ #define CONFIG_FSL_ESDHC #define CONFIG_FSL_USDHC #define CONFIG_SYS_FSL_ESDHC_ADDR 0 +#define CONFIG_SYS_FSL_USDHC_NUM 3 #define CONFIG_MMC #define CONFIG_CMD_MMC @@ -127,7 +128,7 @@ "fdt_addr=0x83000000\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ - "mmcdev=0\0" \ + "mmcdev=1\0" \ "mmcpart=1\0" \ "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ @@ -230,7 +231,7 @@ #define CONFIG_SYS_NO_FLASH #define CONFIG_ENV_SIZE SZ_8K -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #if defined CONFIG_SYS_BOOT_SPINOR #define CONFIG_SYS_USE_SPINOR |