]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mx53ard: Use gpio_direction_input prior to gpio_get_value
authorFabio Estevam <festevam@gmail.com>
Wed, 8 Feb 2012 02:34:42 +0000 (02:34 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Mon, 27 Feb 2012 20:19:23 +0000 (21:19 +0100)
Use gpio_direction_input prior to gpio_get_value.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
board/freescale/mx53ard/mx53ard.c

index 40b5c1967ff6b344ad0a83bb55ee90f404ff20d5..e90e39ee0af1ce9eb60f6fac21f4bb111b03c7b7 100644 (file)
@@ -89,7 +89,9 @@ int board_mmc_getcd(struct mmc *mmc)
        int ret;
 
        mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
+       gpio_direction_input(1);
        mxc_request_iomux(MX53_PIN_GPIO_4, IOMUX_CONFIG_ALT1);
+       gpio_direction_input(4);
 
        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
                ret = !gpio_get_value(1); /* GPIO1_1 */