[U-Boot] [PATCH 2/2] vision2: Configure the pins as GPIOs prior to using gpio_get_value.
Fabio Estevam
fabio.estevam at freescale.com
Mon Nov 21 15:09:45 CET 2011
Configure the pin as GPIO prior to using gpio_get_value
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
board/ttcontrol/vision2/vision2.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c
index f556d30..e0fa39d 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -529,8 +529,11 @@ int get_mmc_getcd(u8 *cd, struct mmc *mmc)
{
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
- if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
+ if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR) {
+ mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1);
*cd = gpio_get_value(0);
+ }
+
else
*cd = 0;
--
1.6.0.4
More information about the U-Boot
mailing list