aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2021-08-17 17:20:33 +0800
committerPeng Fan <peng.fan@nxp.com>2021-09-10 18:17:41 +0800
commit3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3 (patch)
tree8ac23c181bb4a675060fdc49f798f1d83f050f6b
parentb817959bd4cc90c1f6405547a2a6c242b3a4b731 (diff)
downloadu-boot-3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3.zip
u-boot-3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3.tar.gz
u-boot-3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3.tar.bz2
mmc: fix switch issue with send_status disabled
When send_status is false or wait_dat0 is not supported, the switch function should not send CMD13 but directly return. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/mmc/mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index bd34897..6f767cb 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -823,7 +823,7 @@ static int __mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value,
* capable of polling by using mmc_wait_dat0, then rely on waiting the
* stated timeout to be sufficient.
*/
- if (ret == -ENOSYS && !send_status) {
+ if (ret == -ENOSYS || !send_status) {
mdelay(timeout_ms);
return 0;
}