From: Christian Gmeiner Date: Thu, 23 Oct 2014 11:46:43 +0000 (+0200) Subject: ot1200: rework card detect for eMMC X-Git-Tag: v2015.01-rc1~35^2~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=56740fa96f338025bf1c75e84a77120423f16680;p=u-boot ot1200: rework card detect for eMMC Signed-off-by: Christian Gmeiner --- diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c index 45d761ff39..2ed8cf75d6 100644 --- a/board/bachmann/ot1200/ot1200.c +++ b/board/bachmann/ot1200/ot1200.c @@ -155,9 +155,10 @@ int board_mmc_getcd(struct mmc *mmc) struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; int ret; - if (cfg->esdhc_base == USDHC3_BASE_ADDR) - ret = 1; - else { + if (cfg->esdhc_base == USDHC3_BASE_ADDR) { + gpio_direction_input(IMX_GPIO_NR(4, 5)); + ret = gpio_get_value(IMX_GPIO_NR(4, 5)); + } else { gpio_direction_input(IMX_GPIO_NR(1, 4)); ret = !gpio_get_value(IMX_GPIO_NR(1, 4)); }