* [U-Boot] [PATCH 14/20] mmc: Print error code for mmc_complete_init failure
@ 2017-01-10 10:18 ` Jagan Teki
2017-01-19 11:33 ` Jaehoon Chung
0 siblings, 1 reply; 2+ messages in thread
From: Jagan Teki @ 2017-01-10 10:18 UTC (permalink / raw)
To: u-boot
From: Jagan Teki <jagan@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@samsung.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
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;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 14/20] mmc: Print error code for mmc_complete_init failure
2017-01-10 10:18 ` [U-Boot] [PATCH 14/20] mmc: Print error code for mmc_complete_init failure Jagan Teki
@ 2017-01-19 11:33 ` Jaehoon Chung
0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2017-01-19 11:33 UTC (permalink / raw)
To: u-boot
Hi,
On 01/10/2017 07:18 PM, Jagan Teki wrote:
> From: Jagan Teki <jagan@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@samsung.com>
> Signed-off-by: Jagan Teki <jagan@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;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-19 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20170110101856epcas4p4a9365213221c688c13c948f4e586ed77@epcas4p4.samsung.com>
2017-01-10 10:18 ` [U-Boot] [PATCH 14/20] mmc: Print error code for mmc_complete_init failure Jagan Teki
2017-01-19 11:33 ` Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.