From 5c1214de8c7b8b3e807ec09508e653580872e599 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Mon, 3 Dec 2012 02:19:45 +0000 Subject: [PATCH] cm-t35: implement board specific card detect check Implement a card detection check for cm-t35. Signed-off-by: Nikita Kiryanov Signed-off-by: Igor Grinberg --- board/cm_t35/cm_t35.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c index 89e0fd30a8..dfd91e78c8 100644 --- a/board/cm_t35/cm_t35.c +++ b/board/cm_t35/cm_t35.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -377,6 +378,16 @@ void set_muxconf_regs(void) } #ifdef CONFIG_GENERIC_MMC +int board_mmc_getcd(struct mmc *mmc) +{ + u8 val; + + if (twl4030_i2c_read_u8(TWL4030_CHIP_GPIO, &val, TWL4030_BASEADD_GPIO)) + return -1; + + return !(val & 1); +} + int board_mmc_init(bd_t *bis) { return omap_mmc_init(0, 0, 0, -1); -- 2.30.2