summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-07-15 01:58:24 +0200
committerTom Rini <trini@konsulko.com>2022-08-10 13:38:29 -0400
commit2349ecffec5fc91d3c8964725865132c73d68f15 (patch)
treea1a3b5c3c248bc6e88f4dbbf4ab2adac46a8c76c /drivers
parent3dd4e916324efc825a7ee8e412f5cf1ded839021 (diff)
downloadu-boot-2349ecffec5fc91d3c8964725865132c73d68f15.tar.gz
u-boot-2349ecffec5fc91d3c8964725865132c73d68f15.tar.bz2
u-boot-2349ecffec5fc91d3c8964725865132c73d68f15.zip
mmc: Do not send status of send_status is false
Commit 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") introduced a side effect where CMD13 SEND_STATUS is issued in case mmc_wait_dat0() does not return -ENOSYS and $send_status is not set. This happens on all hardware which does implement .mmc_wait_dat0 callback, e.g. i.MX8M . This leads to lengthy timeout before booting OS in case of eMMC in one of the HS200/HS400 modes, since the card cannot respond to CMD13 while downgrading from HS200/HS400 to regular HS mode. Fix this by adding the missing conditional. Fixes: 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Kirill Kapranov <kirill.kapranov@compulab.co.il> Cc: Marek BehĂșn <marek.behun@nic.cz> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Ye Li <ye.li@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 8efee9977e..0b7c0be8cb 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -831,6 +831,9 @@ static int __mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value,
return 0;
}
+ if (!send_status)
+ return 0;
+
/* Finally wait until the card is ready or indicates a failure
* to switch. It doesn't hurt to use CMD13 here even if send_status
* is false, because by now (after 'timeout_ms' ms) the bus should be