summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2012-12-03 02:19:45 +0000
committerTom Rini <trini@ti.com>2013-03-08 16:41:13 -0500
commit5c1214de8c7b8b3e807ec09508e653580872e599 (patch)
treea96866722618d5d4989e01d8887433649a70eaf0
parente874d5b001e9d7ea0fc7596ef0fe6dd520ed8ec6 (diff)
downloadu-boot-imx-5c1214de8c7b8b3e807ec09508e653580872e599.zip
u-boot-imx-5c1214de8c7b8b3e807ec09508e653580872e599.tar.gz
u-boot-imx-5c1214de8c7b8b3e807ec09508e653580872e599.tar.bz2
cm-t35: implement board specific card detect check
Implement a card detection check for cm-t35. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
-rw-r--r--board/cm_t35/cm_t35.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c
index 89e0fd3..dfd91e7 100644
--- a/board/cm_t35/cm_t35.c
+++ b/board/cm_t35/cm_t35.c
@@ -33,6 +33,7 @@
#include <net.h>
#include <i2c.h>
#include <usb.h>
+#include <mmc.h>
#include <twl4030.h>
#include <linux/compiler.h>
@@ -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);