Commit 56740fa9 authored by Christian Gmeiner's avatar Christian Gmeiner Committed by Stefano Babic

ot1200: rework card detect for eMMC

Signed-off-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
parent 5a9ca420
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment