]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mx51evk: Configure the pins as GPIOs prior to using gpio_get_value
authorFabio Estevam <festevam@gmail.com>
Tue, 15 Nov 2011 05:51:33 +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/mx51evk/mx51evk.c

index 37e6e4dbe8014d8c7893a0e2a3158db4164ae5e1..e5b0929f65e0b4641373127e5072805f25713436 100644 (file)
@@ -265,6 +265,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
+       mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1);
+       mxc_request_iomux(MX51_PIN_GPIO1_6, IOMUX_CONFIG_ALT0);
+
        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
                *cd = gpio_get_value(0);
        else