diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2019-01-04 00:09:43 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-15 23:28:43 +0300 |
commit | d2a083696e403aa34288638fcef943deedaf1492 (patch) | |
tree | 0000e3672254c1d19306b3969d6232cf97599568 | |
parent | b9a2a0e2e9c024009010a9755d5377795f660b1a (diff) | |
download | u-boot-d2a083696e403aa34288638fcef943deedaf1492.tar.xz |
cmd: mmc: Force mmc reinit when no card present
In case the card is removed, force-init the MMC to start the internal
machinery which deregisters and invalidate the MMC device.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r-- | cmd/mmc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -101,6 +101,9 @@ static struct mmc *init_mmc_device(int dev, bool force_init) return NULL; } + if (!mmc_getcd(mmc)) + force_init = true; + if (force_init) mmc->has_init = 0; if (mmc_init(mmc)) |