diff options
author | Jason Liu <r64343@freescale.com> | 2013-11-14 14:37:31 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2013-11-15 10:52:25 +0800 |
commit | e505325b92b26fda58b30a42fc21ca57791ae9e7 (patch) | |
tree | 53f30843f485252e70902a38780d468a672460bb | |
parent | 84db283d36295a2d778b2cfe3e2957509ff1dc78 (diff) | |
download | u-boot-imx-e505325b92b26fda58b30a42fc21ca57791ae9e7.zip u-boot-imx-e505325b92b26fda58b30a42fc21ca57791ae9e7.tar.gz u-boot-imx-e505325b92b26fda58b30a42fc21ca57791ae9e7.tar.bz2 |
ENGR00288064 set the mmcdev number dynamiclly according to the boot slot
For the SPI/WEIM NOR, it can't store all the images into it due to it's
capacity, we need one default mmc device to load the left image or rootfs.
The end user need change the default setting according to their needs.
For NAND/SATA boot, the storage is big enough to hold all the stuff.
For SD/MMC boot, mmcdev is dynamiclly created due to the boot SD/MMC slot.
Signed-off-by: Jason Liu <r64343@freescale.com>
-rw-r--r-- | board/freescale/mx6qsabresd/mx6qsabresd.c | 2 | ||||
-rw-r--r-- | include/configs/mx6qsabre_common.h | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c index 335e32c..aa53541 100644 --- a/board/freescale/mx6qsabresd/mx6qsabresd.c +++ b/board/freescale/mx6qsabresd/mx6qsabresd.c @@ -361,6 +361,8 @@ int mmc_get_env_devno(void) dev_no--; + setenv_ulong("mmcdev", dev_no); + return dev_no; } diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h index 3790f30..669a377 100644 --- a/include/configs/mx6qsabre_common.h +++ b/include/configs/mx6qsabre_common.h @@ -107,6 +107,19 @@ #define CONFIG_MFG_NAND_PARTITION "" #endif +/* + * For the SPI/WEIM NOR, it can't store all the images into it due to it's + * capacity, we need one default mmc device to load the left image or rootfs. + * The end user need change the default setting according to their needs. + * For NAND/SATA boot, the storage is big enough to hold all the stuff. + * For SD/MMC boot, mmcdev is dynamiclly created due to the boot SD/MMC slot. + */ +#if defined(CONFIG_SYS_BOOT_EIMNOR) || defined(CONFIG_SYS_BOOT_SPINOR) +#define CONFIG_MMC_DEV_SET "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) +#else +#define CONFIG_MMC_DEV_SET " " +#endif + #define CONFIG_MFG_ENV_SETTINGS \ "mfgtool_args=setenv bootargs console=" CONFIG_CONSOLE_DEV ",115200 " \ "rdinit=/linuxrc " \ @@ -166,7 +179,8 @@ "console=" CONFIG_CONSOLE_DEV "\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ + CONFIG_MMC_DEV_SET \ + "\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ "smp=" CONFIG_SYS_NOSMP "\0"\ |