diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2014-10-23 13:46:43 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-10-30 10:46:28 +0100 |
commit | 56740fa96f338025bf1c75e84a77120423f16680 (patch) | |
tree | 6043905b6c054224e3afcc722465c820a5f5fd9e | |
parent | 5a9ca420ce8d90e668c5e0660881f16328984fb0 (diff) | |
download | u-boot-imx-56740fa96f338025bf1c75e84a77120423f16680.zip u-boot-imx-56740fa96f338025bf1c75e84a77120423f16680.tar.gz u-boot-imx-56740fa96f338025bf1c75e84a77120423f16680.tar.bz2 |
ot1200: rework card detect for eMMC
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
-rw-r--r-- | board/bachmann/ot1200/ot1200.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c index 45d761f..2ed8cf7 100644 --- a/board/bachmann/ot1200/ot1200.c +++ b/board/bachmann/ot1200/ot1200.c @@ -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)); } |