diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2019-11-26 10:58:55 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2020-03-05 19:22:23 +0100 |
commit | cc33106ef7961ac85574cc030039ae8d1f01b619 (patch) | |
tree | 01f44ff611d7eda0fbd802f63fbd1c30a2c40622 /board | |
parent | ea4439cccf6b315fce3a6881b3368e8cd23411ac (diff) |
imx8mm-evk, imx8mm-val: take changed sd/mmc spl boot order into account
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/imx8mm_evk/spl.c | 18 | ||||
-rw-r--r-- | board/freescale/imx8mm_val/spl.c | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c index c1cd58164c9..6d1c76a35d9 100644 --- a/board/freescale/imx8mm_evk/spl.c +++ b/board/freescale/imx8mm_evk/spl.c @@ -96,13 +96,18 @@ int board_mmc_init(bd_t *bis) /* * According to the board_mmc_init() the following map is done: * (U-Boot device node) (Physical Port) - * mmc0 USDHC1 - * mmc1 USDHC2 + * mmc0 USDHC2 (SD card) + * mmc1 USDHC1 (eMMC) */ for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { case 0: - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); + usdhc_cfg[i].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); + imx_iomux_v3_setup_multiple_pads( + usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); + break; + case 1: + usdhc_cfg[i].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); imx_iomux_v3_setup_multiple_pads( usdhc2_pads, ARRAY_SIZE(usdhc2_pads)); gpio_request(USDHC2_PWR_GPIO, "usdhc2_reset"); @@ -110,11 +115,6 @@ int board_mmc_init(bd_t *bis) udelay(500); gpio_direction_output(USDHC2_PWR_GPIO, 1); break; - case 1: - usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); - imx_iomux_v3_setup_multiple_pads( - usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); - break; default: printf("Warning: you configured more USDHC controllers" "(%d) than supported by the board\n", i + 1); @@ -136,7 +136,7 @@ int board_mmc_getcd(struct mmc *mmc) switch (cfg->esdhc_base) { case USDHC3_BASE_ADDR: - ret = 1; + ret = 1; /* eMMC */ break; case USDHC2_BASE_ADDR: imx_iomux_v3_setup_pad(usdhc2_cd_pad); diff --git a/board/freescale/imx8mm_val/spl.c b/board/freescale/imx8mm_val/spl.c index 878cb4c9267..b6cc87830c5 100644 --- a/board/freescale/imx8mm_val/spl.c +++ b/board/freescale/imx8mm_val/spl.c @@ -97,13 +97,18 @@ int board_mmc_init(bd_t *bis) /* * According to the board_mmc_init() the following map is done: * (U-Boot device node) (Physical Port) - * mmc0 USDHC1 - * mmc1 USDHC2 + * mmc0 USDHC2 (SD card) + * mmc1 USDHC1 (eMMC) */ for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { case 0: - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); + usdhc_cfg[i].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); + imx_iomux_v3_setup_multiple_pads( + usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); + break; + case 1: + usdhc_cfg[i].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); imx_iomux_v3_setup_multiple_pads( usdhc2_pads, ARRAY_SIZE(usdhc2_pads)); gpio_request(USDHC2_PWR_GPIO, "usdhc2_reset"); @@ -111,11 +116,6 @@ int board_mmc_init(bd_t *bis) udelay(500); gpio_direction_output(USDHC2_PWR_GPIO, 1); break; - case 1: - usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); - imx_iomux_v3_setup_multiple_pads( - usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); - break; default: printf("Warning: you configured more USDHC controllers" "(%d) than supported by the board\n", i + 1); @@ -137,7 +137,7 @@ int board_mmc_getcd(struct mmc *mmc) switch (cfg->esdhc_base) { case USDHC3_BASE_ADDR: - ret = 1; + ret = 1; /* eMMC */ break; case USDHC2_BASE_ADDR: imx_iomux_v3_setup_pad(usdhc2_cd_pad); |