public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 3/4] exynos: be more verbose in process_nodes()
@ 2015-09-20 23:54 Tobias Jakobi
  2015-09-20 23:54 ` [U-Boot] [PATCH 4/4] exynos: fix and cleanup do_sdhci_init() Tobias Jakobi
  2015-09-23  9:41 ` [U-Boot] [PATCH 3/4] exynos: be more verbose in process_nodes() Lukasz Majewski
  0 siblings, 2 replies; 11+ messages in thread
From: Tobias Jakobi @ 2015-09-20 23:54 UTC (permalink / raw)
  To: u-boot

In case sdhci_get_config() or do_sdhci_init() fail, show
the error code that was returned.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 drivers/mmc/s5p_sdhci.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index bc2102a..6be3609 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -171,7 +171,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host)
 static int process_nodes(const void *blob, int node_list[], int count)
 {
 	struct sdhci_host *host;
-	int i, node;
+	int i, node, ret;
 
 	debug("%s: count = %d\n", __func__, count);
 
@@ -183,13 +183,15 @@ static int process_nodes(const void *blob, int node_list[], int count)
 
 		host = &sdhci_host[i];
 
-		if (sdhci_get_config(blob, node, host)) {
-			printf("%s: failed to decode dev %d\n",	__func__, i);
+		ret = sdhci_get_config(blob, node, host);
+		if (ret) {
+			printf("%s: failed to decode dev %d (%d)\n", __func__, i, ret);
 			return -1;
 		}
 
-		if (do_sdhci_init(host)) {
-			printf("%s: failed to initialize dev %d\n", __func__, i);
+		ret = do_sdhci_init(host);
+		if (ret) {
+			printf("%s: failed to initialize dev %d (%d)\n", __func__, i, ret);
 			return -2;
 		}
 	}
-- 
2.0.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-09-24 15:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-20 23:54 [U-Boot] [PATCH 3/4] exynos: be more verbose in process_nodes() Tobias Jakobi
2015-09-20 23:54 ` [U-Boot] [PATCH 4/4] exynos: fix and cleanup do_sdhci_init() Tobias Jakobi
2015-09-23  9:44   ` Lukasz Majewski
2015-09-23  9:48     ` Lukasz Majewski
2015-09-23  9:59       ` Jaehoon Chung
2015-09-23 10:06         ` Lukasz Majewski
2015-09-23 10:06         ` Minkyu Kang
2015-09-24 12:48           ` Tobias Jakobi
2015-09-24 13:27             ` Lukasz Majewski
2015-09-24 15:05   ` Przemyslaw Marczak
2015-09-23  9:41 ` [U-Boot] [PATCH 3/4] exynos: be more verbose in process_nodes() Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox