]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00180768 sd:detect some sd2.0 cards to sd1.0
authorB38613 <B38613@freescale.com>
Wed, 25 Apr 2012 05:51:44 +0000 (13:51 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:40 +0000 (08:34 +0200)
when SD_SPEC=2, no matter Physical Layer Spec v3.0
is supported or not, should both be recognized as
SD2.0card.

Signed-off-by: Zhou Jianzheng <B38613@freescale.com>
(cherry picked from commit 59f5c06bba9e426326346fc00c1524cb789d695a)

drivers/mmc/core/sd.c

index 5d9d7529e130b3f7e971d29bcba2be164d4b7794..ae4b1af47f22320a430050e2ee9c7197f8279e2f 100644 (file)
@@ -306,6 +306,9 @@ static int mmc_read_switch(struct mmc_card *card)
                goto out;
        }
 
+       if (status[13] & 0x02)
+               card->sw_caps.hs_max_dtr = 50000000;
+
        if (card->scr.sda_spec3) {
                card->sw_caps.sd3_bus_mode = status[13];
 
@@ -348,9 +351,6 @@ static int mmc_read_switch(struct mmc_card *card)
                }
 
                card->sw_caps.sd3_curr_limit = status[7];
-       } else {
-               if (status[13] & 0x02)
-                       card->sw_caps.hs_max_dtr = 50000000;
        }
 
 out: