[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1650964532-9379-1-git-send-email-quic_spathi@quicinc.com>
Date: Tue, 26 Apr 2022 14:45:32 +0530
From: Srinivasarao Pathipati <quic_spathi@...cinc.com>
To: ulf.hansson@...aro.org, avri.altman@....com,
linus.walleij@...aro.org, vbadigan@...eaurora.org,
shawn.lin@...k-chips.com, s.shtylyov@....ru, merez@...eaurora.org,
wsa+renesas@...g-engineering.com, briannorris@...omium.org,
sayalil@...eaurora.org, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Kishor Krishna Bhat <quic_kishkris@...cinc.com>,
kamasali <quic_kamasali@...cinc.com>,
Srinivasarao Pathipati <quic_spathi@...cinc.com>
Subject: [PATCH V1] mmc: core: Select HS mode in device first and then in the host
From: Sayali Lokhande <sayalil@...eaurora.org>
While switching from hs400 to hs200 mode, high speed mode
timing should be selected in the device before changing the
clock frequency in the host. But current implementation,
(mmc_hs400_to_hs200) first updates the frequency in the host
and then updates mode in the device. This is a spec violation.
Hence update the sequence to comply with the spec.
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@...eaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@...eaurora.org>
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@...cinc.com>
Signed-off-by: kamasali <quic_kamasali@...cinc.com>
Signed-off-by: Srinivasarao Pathipati <quic_spathi@...cinc.com>
---
drivers/mmc/core/mmc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 8691c00..b4bcebc 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1259,10 +1259,6 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
int err;
u8 val;
- /* Reduce frequency to HS */
- max_dtr = card->ext_csd.hs_max_dtr;
- mmc_set_clock(host, max_dtr);
-
/* Switch HS400 to HS DDR */
val = EXT_CSD_TIMING_HS;
err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING,
@@ -1276,6 +1272,10 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
mmc_set_timing(host, MMC_TIMING_MMC_DDR52);
+ /* Reduce frequency to HS */
+ max_dtr = card->ext_csd.hs_max_dtr;
+ mmc_set_clock(host, max_dtr);
+
err = mmc_switch_status(card, true);
if (err)
goto out_err;
--
2.7.4
Powered by blists - more mailing lists