On Mon, Nov 07, 2011 at 08:20:10AM -0500, Chris Ball wrote:
> Have you seen:
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=f2815f68dabbb373fd1c9f0fd4a609d486697c2b
>
> ("mmc: sd: Handle SD3.0 cards not supporting UHS-I bus speed mode")
>
> which is already in mainline? I think your patch is identical.
Hi Chris,
I think the existing code is somewhat confusing, since SDR50 means
100MHZ frequency while high speed is 50MHZ.
The reason it is correct is UHS_SDR50_BUS_SPEED is defined as 2,
which happened to be the same value as (1 << UHS_SDR25_BUS_SPEED).
How about change it like this:
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index a230e7f..670fd7f 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -306,7 +306,7 @@ static int mmc_read_switch(struct mmc_card *card)
goto out;
}
- if (status[13] & UHS_SDR50_BUS_SPEED)
+ if (status[13] & SD_MODE_UHS_SDR25)
card->sw_caps.hs_max_dtr = 50000000;
if (card->scr.sda_spec3) {
SDR25 is also 50MHZ, the same frequency as high speed.
Or we can add a new macro for high speed like qiang has done,
which one you prefer?
Thanks,
Aaron
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html