[U-Boot] [PATCH] mmc: Fix decoding of SCR & function switch data on little-endian machines

Andy Fleming afleming at freescale.com
Fri May 8 00:07:38 CEST 2009


On May 6, 2009, at 4:43 PM, Yauhen Kharuzhy wrote:

> SCR & switch data are read from card as big-endian words and should be
> converted to CPU byte order.
>
> Signed-off-by: Yauhen Kharuzhy <jekhor at gmail.com>
> ---
>
> -	if ((switch_status[4] & 0x0f000000) == 0x01000000)
> +	if ((__be32_to_cpu(switch_status[4]) & 0x0f000000) == 0x01000000) {
> 		mmc->card_caps |= MMC_MODE_HS;
> +		printf("Switched to HS mode\n");
> +	}


You left some debug output there.



More information about the U-Boot mailing list