Chris, Aaron,

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;
 
Using SD_MODE_UHS_SDR25 macro name is not appropriate here. It's really not
the SDR25 mode (although clock rate is 50mhz), it's High speed mode only.
"Qiang Liu" patch had defined new marco "SD_MODE_HIGH_SPEED" which looks
most appropriate to use here.

@@ -99,6 +99,7 @@ struct sd_ssr {
 struct sd_switch_caps {
        unsigned int            hs_max_dtr;
        unsigned int            uhs_max_dtr;
+#define HIGH_SPEED_MAX_DTR     50000000
 #define UHS_SDR104_MAX_DTR     208000000
 #define UHS_SDR50_MAX_DTR      100000000
 #define UHS_DDR50_MAX_DTR      50000000
@@ -106,11 +107,13 @@ struct sd_switch_caps {
 #define UHS_SDR12_MAX_DTR      25000000
        unsigned int            sd3_bus_mode;
 #define UHS_SDR12_BUS_SPEED    0
+#define HIGH_SPEED_BUS_SPEED   1
 #define UHS_SDR25_BUS_SPEED    1
 #define UHS_SDR50_BUS_SPEED    2
 #define UHS_SDR104_BUS_SPEED   3
 #define UHS_DDR50_BUS_SPEED    4

+#define SD_MODE_HIGH_SPEED     (1 << HIGH_SPEED_BUS_SPEED)
 #define SD_MODE_UHS_SDR12      (1 << UHS_SDR12_BUS_SPEED)
 #define SD_MODE_UHS_SDR25      (1 << UHS_SDR25_BUS_SPEED)
 #define SD_MODE_UHS_SDR50      (1 << UHS_SDR50_BUS_SPEED)
--

Regards,
Subhash


> -----Original Message-----
> From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc-
> ow...@vger.kernel.org] On Behalf Of Chris Ball
> Sent: Tuesday, November 08, 2011 7:08 PM
> To: Aaron Lu
> Cc: Qiang Liu; linux-mmc@vger.kernel.org; le...@freescale.com;
> kumar.g...@freescale.com; subha...@codeaurora.org
> Subject: Re: [PATCH] SD/MMC: fix the issue of SDHC performance
> regression
> 
> Hi,
> 
> On Tue, Nov 08 2011, Aaron Lu wrote:
> > 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?
> 
> The new macro makes most sense to me -- if no-one disagrees, I'll
> convert Liu's patch into a rename patch and queue it as a cleanup
> for 3.2.  Thanks!
> 
> - Chris.
> --
> Chris Ball   <c...@laptop.org>   <http://printf.net/>
> One Laptop Per Child
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to