]> git.sur5r.net Git - u-boot/commitdiff
ot1200: rework card detect for eMMC
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Thu, 23 Oct 2014 11:46:43 +0000 (13:46 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 30 Oct 2014 09:46:28 +0000 (10:46 +0100)
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
board/bachmann/ot1200/ot1200.c

index 45d761ff39ce01ebba6d5c2664dcb630f6fdcd01..2ed8cf75d64fda74508c9f1a819bf07819440d3c 100644 (file)
@@ -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));
        }