diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2017-10-10 13:43:42 -0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2017-10-31 11:35:01 +0100 |
commit | 40b0dae15159bf14f24cf7714ddd690ae3ca65e3 (patch) | |
tree | a4f75afbff657a415afcfeacfc829dfebc7fb4df /board/freescale/mx6slevk | |
parent | 0d6a41edb567ab1fde90fecb1e12a77a7b9ed888 (diff) | |
download | u-boot-40b0dae15159bf14f24cf7714ddd690ae3ca65e3.tar.gz |
mx6slevk: Call gpio_request()
We should call gpio_request() prior to reading the GPIO value.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Diffstat (limited to 'board/freescale/mx6slevk')
-rw-r--r-- | board/freescale/mx6slevk/mx6slevk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index 0597dbe8be..e98aa106ba 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -273,12 +273,15 @@ int board_mmc_getcd(struct mmc *mmc) switch (cfg->esdhc_base) { case USDHC1_BASE_ADDR: + gpio_request(USDHC1_CD_GPIO, "cd1_gpio"); ret = !gpio_get_value(USDHC1_CD_GPIO); break; case USDHC2_BASE_ADDR: + gpio_request(USDHC2_CD_GPIO, "cd2_gpio"); ret = !gpio_get_value(USDHC2_CD_GPIO); break; case USDHC3_BASE_ADDR: + gpio_request(USDHC3_CD_GPIO, "cd3_gpio"); ret = !gpio_get_value(USDHC3_CD_GPIO); break; } |