diff options
author | Marcin Niestroj <m.niestroj@grinn-global.com> | 2016-10-21 13:53:54 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-11-29 16:31:53 +0100 |
commit | 54e4fcfa3c749a789192e83740a53234182f4ca3 (patch) | |
tree | b0125b41cc0f431f9eb21e484e8392e3ca51421c /arch/arm/imx-common/spl.c | |
parent | 2d221489df021393654805536be7effcb9d39702 (diff) | |
download | u-boot-imx-54e4fcfa3c749a789192e83740a53234182f4ca3.zip u-boot-imx-54e4fcfa3c749a789192e83740a53234182f4ca3.tar.gz u-boot-imx-54e4fcfa3c749a789192e83740a53234182f4ca3.tar.bz2 |
ARM: mx6: add MMC2 boot device detection support in SPL
Check BOOT_CFG2[3:4] to determine which SD/MMC port is selected to boot
from. If MMC2 is selected return BOOT_DEVICE_MMC2. In all other cases
return BOOT_DEVICE_MMC1, as we do not have corresponding macro for MMC3
and MMC4.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Diffstat (limited to 'arch/arm/imx-common/spl.c')
-rw-r--r-- | arch/arm/imx-common/spl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/imx-common/spl.c b/arch/arm/imx-common/spl.c index bdcda7d..325ba26 100644 --- a/arch/arm/imx-common/spl.c +++ b/arch/arm/imx-common/spl.c @@ -14,6 +14,9 @@ #include <spl.h> #if defined(CONFIG_MX6) +#define MX6_MMC_PORT_MASK GENMASK(12, 11) +#define MX6_MMC_PORT_2 BIT(11) + /* determine boot device from SRC_SBMR1 (BOOT_CFG[4:1]) or SRC_GPR9 register */ u32 spl_boot_device(void) { @@ -55,10 +58,11 @@ u32 spl_boot_device(void) /* SD/eSD: 8.5.3, Table 8-15 */ case 0x4: case 0x5: - return BOOT_DEVICE_MMC1; /* MMC/eMMC: 8.5.3 */ case 0x6: case 0x7: + if ((reg & MX6_MMC_PORT_MASK) == MX6_MMC_PORT_2) + return BOOT_DEVICE_MMC2; return BOOT_DEVICE_MMC1; /* NAND Flash: 8.5.2 */ case 0x8 ... 0xf: |