[U-Boot] [PATCH 14/20] mmc: Print error code for mmc_complete_init failure

Jaehoon Chung jh80.chung at samsung.com
Thu Jan 19 12:33:20 CET 2017


Hi,

On 01/10/2017 07:18 PM, Jagan Teki wrote:
> From: Jagan Teki <jagan at amarulasolutions.com>
> 
> Print the error code for non-zero (failure case) instead
> of making debug statement without any condition, this
> usually gives proper clue in failure condition.
> 
> Log:
> ---
> MMC:   FSL_SDHC: 0
> mmc_init: -70, time 38
> *** Warning - MMC init failed, using default environment
> 
> Cc: Jaehoon Chung <jh80.chung at samsung.com>
> Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>

I didn't see the other patches..but i picked this patch on u-boot-mmc.

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/mmc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 9f8368a..3648950 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1751,7 +1751,9 @@ int mmc_init(struct mmc *mmc)
>  
>  	if (!err)
>  		err = mmc_complete_init(mmc);
> -	debug("%s: %d, time %lu\n", __func__, err, get_timer(start));
> +	if (err)
> +		printf("%s: %d, time %lu\n", __func__, err, get_timer(start));
> +
>  	return err;
>  }
>  
> 



More information about the U-Boot mailing list