mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
ot1200: rework card detect for eMMC
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
parent
5a9ca420ce
commit
56740fa96f
1 changed files with 4 additions and 3 deletions
|
@ -155,9 +155,10 @@ int board_mmc_getcd(struct mmc *mmc)
|
|||
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
|
||||
int ret;
|
||||
|
||||
if (cfg->esdhc_base == USDHC3_BASE_ADDR)
|
||||
ret = 1;
|
||||
else {
|
||||
if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
|
||||
gpio_direction_input(IMX_GPIO_NR(4, 5));
|
||||
ret = gpio_get_value(IMX_GPIO_NR(4, 5));
|
||||
} else {
|
||||
gpio_direction_input(IMX_GPIO_NR(1, 4));
|
||||
ret = !gpio_get_value(IMX_GPIO_NR(1, 4));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue