]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
cmd_mmc: make mmc dev always re-probe the HW
authorStephen Warren <swarren@nvidia.com>
Fri, 23 May 2014 19:24:47 +0000 (13:24 -0600)
committerPantelis Antoniou <panto@antoniou-consulting.com>
Thu, 12 Jun 2014 12:21:12 +0000 (15:21 +0300)
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: Stephen Warren <swarren@nvidia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
common/cmd_mmc.c

index 6c8db2e78c4f5ebc18a9dee6d0744d5904e513d6..1e40983c757b1d71efb7ee1a4e7e5d2b6e44734a 100644 (file)
@@ -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;