mx53ard: Configure the pins as GPIOs prior to using gpio_get_value
authorFabio Estevam <festevam@gmail.com>
Tue, 15 Nov 2011 05:51:30 +0000 (05:51 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 6 Dec 2011 22:59:39 +0000 (23:59 +0100)
Configure the pins as GPIO prior to using gpio_get_value.

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

index be32aee14f4adb1dc24a4ff52b1f62953e994881..e5a11429f29540688367f92537b423448b99b91a 100644 (file)
@@ -87,6 +87,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
+       mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
+       mxc_request_iomux(MX53_PIN_GPIO_4, IOMUX_CONFIG_ALT1);
+
        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
                *cd = gpio_get_value(1); /*GPIO1_1*/
        else