[U-Boot] [PATCH 1/3] mx6qsabresd: Fix card detection for invalid card id case

Otavio Salvador otavio at ossystems.com.br
Sat Mar 2 22:49:03 CET 2013


Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---
 board/freescale/mx6qsabresd/mx6qsabresd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c
index 65c4a1a..3c00023 100644
--- a/board/freescale/mx6qsabresd/mx6qsabresd.c
+++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
@@ -151,9 +151,11 @@ int board_mmc_getcd(struct mmc *mmc)
 		return !gpio_get_value(USDHC2_CD_GPIO);
 	case USDHC3_BASE_ADDR:
 		return !gpio_get_value(USDHC3_CD_GPIO);
-	default:
+	case USDHC4_BASE_ADDR:
 		return 1; /* eMMC/uSDHC4 is always present */
 	}
+
+	return 0;
 }
 
 int board_mmc_init(bd_t *bis)
-- 
1.8.1



More information about the U-Boot mailing list