From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pantelis Antoniou Date: Thu, 12 Jun 2014 14:31:51 +0300 Subject: [U-Boot] [PATCH 3/3] cmd_mmc: make mmc dev always re-probe the HW In-Reply-To: <1400873087-20921-3-git-send-email-swarren@wwwdotorg.org> References: <1400873087-20921-1-git-send-email-swarren@wwwdotorg.org> <1400873087-20921-3-git-send-email-swarren@wwwdotorg.org> Message-ID: <15F70FA9-6890-4480-9838-9CB9F03B062A@antoniou-consulting.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stephen, On May 23, 2014, at 10:24 PM, Stephen Warren wrote: > From: Stephen Warren > > 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 > --- > common/cmd_mmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c > index 6c8db2e78c4f..1e40983c757b 100644 > --- a/common/cmd_mmc.c > +++ b/common/cmd_mmc.c > @@ -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; > > -- > 1.8.1.5 > Behavioral change that no one could possibly depend on, so I'll just go ahead and get it in. Thanks, applied. -- Pantelis Acked-by: Pantelis Antoniou