mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
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>
This commit is contained in:
parent
b9a2a0e2e9
commit
d2a083696e
1 changed files with 3 additions and 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))
|
||||
|
|
Loading…
Add table
Reference in a new issue