diff options
author | Haibo Chen <haibo.chen@nxp.com> | 2020-09-22 18:11:42 +0800 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-10-12 15:48:13 +0800 |
commit | ef5ab0d13a7a44469f6c765c8acc8d54c23213de (patch) | |
tree | 4bf4366d5456f50862b10f74693cfef8050874ce /drivers/mmc | |
parent | d3c610c6233e8848feea74da3c7a65ea070f1671 (diff) |
mmc: do not send cmd13 if the parameter 'send_status' is 0 for __mmc_switch
According to the code logic in __mmc_switch, if the parameter 'send_status'
is zero, no need to send cmd13, just wait the stated timeout time, then
can return directly.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/mmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 8502503d361..7783535d095 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -805,8 +805,10 @@ 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; + } /* 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 |