diff mbox

[U-Boot,v3,2/7] mx6qsabresd: Return status when initializing MMC

Message ID 1366378923-15615-2-git-send-email-otavio@ossystems.com.br
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Otavio Salvador April 19, 2013, 1:41 p.m. UTC
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v3:
- New patch

Changes in v2: None

 board/freescale/mx6qsabresd/mx6qsabresd.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

Comments

Stefano Babic April 25, 2013, 7:39 p.m. UTC | #1
On 19/04/2013 15:41, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---

Applied to u-boot-imx, -next branch, thanks.

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c
index 0d7cb9e..bf9beef 100644
--- a/board/freescale/mx6qsabresd/mx6qsabresd.c
+++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
@@ -166,6 +166,7 @@  int board_mmc_getcd(struct mmc *mmc)
 
 int board_mmc_init(bd_t *bis)
 {
+	s32 status = 0;
 	int i;
 
 	/*
@@ -196,15 +197,15 @@  int board_mmc_init(bd_t *bis)
 			break;
 		default:
 			printf("Warning: you configured more USDHC controllers"
-				"(%d) than supported by the board\n", i + 1);
-			return 0;
-	       }
+			       "(%d) then supported by the board (%d)\n",
+			       i + 1, CONFIG_SYS_FSL_USDHC_NUM);
+			return status;
+		}
 
-	       if (fsl_esdhc_initialize(bis, &usdhc_cfg[i]))
-			printf("Warning: failed to initialize mmc dev %d\n", i);
+		status |= fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
 	}
 
-	return 0;
+	return status;
 }
 #endif