[U-Boot] [PATCH] mx6qsabresd: Fix mmc boot by making USDHC3 be 'dev 0'

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Thu Jan 10 15:43:24 CET 2013


Hi Fabio,

On Thursday, January 10, 2013 3:32:25 PM, Fabio Estevam wrote:
> By default, we boot from USDHC3 on mx6qsabresd, so let it be mmc dev
> 0.
> 
> Without this fix kernel cannot be retrieved from mmc with the default
> environment.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  board/freescale/mx6qsabresd/mx6qsabresd.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c
> b/board/freescale/mx6qsabresd/mx6qsabresd.c
> index 65c4a1a..fbcb6cd 100644
> --- a/board/freescale/mx6qsabresd/mx6qsabresd.c
> +++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
> @@ -134,8 +134,8 @@ static void setup_iomux_uart(void)
>  
>  #ifdef CONFIG_FSL_ESDHC
>  struct fsl_esdhc_cfg usdhc_cfg[3] = {
> -	{USDHC2_BASE_ADDR},
>  	{USDHC3_BASE_ADDR},
> +	{USDHC2_BASE_ADDR},
>  	{USDHC4_BASE_ADDR},
>  };
>  
> @@ -162,13 +162,13 @@ int board_mmc_init(bd_t *bis)
>  
>  	for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
>  		switch (i) {
> -		case 0:
> +		case 1:
>  			imx_iomux_v3_setup_multiple_pads(
>  				usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
>  			gpio_direction_input(USDHC2_CD_GPIO);
>  			usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
                                  ^ should be changed to 1 or i

>  			break;
> -		case 1:
> +		case 0:
>  			imx_iomux_v3_setup_multiple_pads(
>  				usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
>  			gpio_direction_input(USDHC3_CD_GPIO);

Ditto (with 0 or i) for the following hidden lines.

Best regards,
Benoît


More information about the U-Boot mailing list