diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2018-10-11 12:39:55 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2018-10-12 15:14:41 +0300 |
commit | 9f87d47088abdf514bdaed147145d98039bd5682 (patch) | |
tree | b8b80ccb82316b9f9cb9770a6a3eff8a4051442a /board/synopsys/axs10x/axs10x.c | |
parent | 8a8f32d8ff9db59fc3dccbc4da83dd78e13d9c3e (diff) | |
download | u-boot-9f87d47088abdf514bdaed147145d98039bd5682.tar.gz |
axs10x/emdk/hsdk/iot_dk: Implement board_mmc_getcd()
So now we may detect MMC/SD-card existence and
instead of completely misleading message on missing card:
------------------------>8-----------------------
Loading Environment from FAT... Card did not respond to voltage select!
------------------------>8-----------------------
we now get very clear one:
------------------------>8-----------------------
Loading Environment from FAT... MMC: no card present
------------------------>8-----------------------
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'board/synopsys/axs10x/axs10x.c')
-rw-r--r-- | board/synopsys/axs10x/axs10x.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c index af78127dde..c95f7af7a7 100644 --- a/board/synopsys/axs10x/axs10x.c +++ b/board/synopsys/axs10x/axs10x.c @@ -33,6 +33,13 @@ int board_mmc_init(bd_t *bis) return 0; } +int board_mmc_getcd(struct mmc *mmc) +{ + struct dwmci_host *host = mmc->priv; + + return !(dwmci_readl(host, DWMCI_CDETECT) & 1); +} + #define AXS_MB_CREG 0xE0011000 int board_early_init_f(void) |