On 6/21/2023 11:11 AM, xf_...@163.com wrote:
Caution: This is an external email. Please take care when clicking links or 
opening attachments. When in doubt, report the message using the 'Report this 
email' button


From: xiefei <xf_...@163.com>

Due to the need to read the register value before
switching to hs mode, the standard protocol does
not explicitly specify that the setting before
switching to hs mode is in legacy mode. Therefore,
the code at this point may cause communication
abnormalities between the host and card

Signed-off-by: xiefei <xf_...@163.com>
---
  drivers/mmc/mmc.c | 1 -
  1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 1af6af82e6..915f446973 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2138,7 +2138,6 @@ static int mmc_select_mode_and_width(struct mmc *mmc, 
uint card_caps)
                 mmc_set_card_speed(mmc, MMC_HS, true);
         else
  #endif
-               mmc_set_clock(mmc, mmc->legacy_speed, MMC_CLK_ENABLE);

Has you meet any issues without removing this line? or this is just code inpsection?

BTW the upper "else" will met issue if you directly remove this line.

Regards,
Peng.



         for_each_mmc_mode_by_pref(card_caps, mwt) {
                 for_each_supported_width(card_caps & mwt->widths,
--
2.17.1

Reply via email to