提交 a5710920 编写于 作者: S Stephen Warren 提交者: Pantelis Antoniou

cmd_mmc: make mmc dev always re-probe the HW

Currently, U-Boot behaves as follows:

- Begin with no SD card inserted in "mmc 1"
- Execute: mmc dev 1
- This fails, since there is no card
- User plugs in an SD card
- Execute: mmc dev 1
- This still fails, since the HW isn't reprobed.

With this change, U-Boot behaves as follows:

- Begin with no SD card inserted in "mmc 1"
- Execute: mmc dev 1
- This fails, since there is no card
- User plugs in an SD card
- Execute: mmc dev 1
- The newly present SD card is detected

I know that "mmc rescan" will force the HW to be reprobed, but I feel it
makes more sense if "mmc dev" always reprobes the HW after selecting the
current MMC device. This allows scripts to just execute "mmc dev", and
not have to also execute "mmc rescan" to check for media presense.
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
上级 941944e4
......@@ -418,7 +418,7 @@ static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_USAGE;
}
mmc = init_mmc_device(dev, false);
mmc = init_mmc_device(dev, true);
if (!mmc)
return CMD_RET_FAILURE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册