mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
mx6slevk: Call gpio_request()
We should call gpio_request() prior to reading the GPIO value. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
This commit is contained in:
parent
0d6a41edb5
commit
40b0dae151
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue