public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* UHS-I bus speed mode should be set last in UHS initialization
@ 2011-06-06 22:44 Subhash Jadavani
  0 siblings, 0 replies; 6+ messages in thread
From: Subhash Jadavani @ 2011-06-06 22:44 UTC (permalink / raw)
  To: linux-mmc

Hi Chris, Arindam,

mmc_sd_init_uhs_card function sets the driver type, current limit and bus
speed mode on card as well as on host controller side. Currently bus speed
mode is set by sending CMD6 to card and setting timing mode in host
controller and then before initiating tuning sequence, it also tries to
set current limit by sending CMD6 to card which fails on our host
controller (due to data CRC or timeout errors) if bus speed mode is
SDR50/SDR104 mode.

So basically bus speed mode should be set only after current limit is set
in the card and immediately after setting the bus speed mode, tuning
sequence should be initiated. So following changes is needed. If it looks
fine then I can send you this change in patch.

diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index
0da37eb..19634d5 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -610,13 +610,13 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card)
        if (err)
                goto out;

-       /* Set bus speed mode of the card */
-       err = sd_set_bus_speed_mode(card, status);
+       /* Set current limit for the card */
+       err = sd_set_current_limit(card, status);
        if (err)
                goto out;

-       /* Set current limit for the card */
-       err = sd_set_current_limit(card, status);
+       /* Set bus speed mode of the card */
+       err = sd_set_bus_speed_mode(card, status);
        if (err)
                goto out;

Regards,
Subhash

-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.



^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <000a01cc2a04$09c9d600$1d5d8200$@org>]

end of thread, other threads:[~2011-06-17  9:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-06 22:44 UHS-I bus speed mode should be set last in UHS initialization Subhash Jadavani
     [not found] <000a01cc2a04$09c9d600$1d5d8200$@org>
2011-06-14  7:00 ` Nath, Arindam
2011-06-14 23:57   ` subhashj
2011-06-15  3:00     ` Nath, Arindam
2011-06-17  6:44     ` zhangfei gao
2011-06-17  9:35       ` Nath, Arindam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox