diff mbox

[U-Boot,2/4] mmc: Fix Dual Data Rate capability recognition

Message ID 1417438752-18931-3-git-send-email-andrew_gabbasov@mentor.com
State Accepted
Delegated to: Pantelis Antoniou
Headers show

Commit Message

Gabbasov, Andrew Dec. 1, 2014, 12:59 p.m. UTC
Since the driver doesn't work in 1.2V or 1.8V signaling level modes,
Dual Data Rate mode can be supported by the driver only if it is supported
by the card in regular 3.3V mode. So, check for a particular single
bit in card type field.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
---
 drivers/mmc/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pantelis Antoniou Dec. 12, 2014, 7:13 p.m. UTC | #1
Hi Andrew,

> On Dec 1, 2014, at 14:59 , Andrew Gabbasov <andrew_gabbasov@mentor.com> wrote:
> 
> Since the driver doesn't work in 1.2V or 1.8V signaling level modes,
> Dual Data Rate mode can be supported by the driver only if it is supported
> by the card in regular 3.3V mode. So, check for a particular single
> bit in card type field.
> 
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
> ---
> drivers/mmc/mmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 4603a81..d878c1e 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -519,7 +519,7 @@ static int mmc_change_freq(struct mmc *mmc)
> 
> 	/* High Speed is set, there are two types: 52MHz and 26MHz */
> 	if (cardtype & EXT_CSD_CARD_TYPE_52) {
> -		if (cardtype & EXT_CSD_CARD_TYPE_DDR_52)
> +		if (cardtype & EXT_CSD_CARD_TYPE_DDR_1_8V)
> 			mmc->card_caps |= MMC_MODE_DDR_52MHz;
> 		mmc->card_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
> 	} else {
> -- 
> 2.1.0

Applied, thanks.

— Pantelis
diff mbox

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 4603a81..d878c1e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -519,7 +519,7 @@  static int mmc_change_freq(struct mmc *mmc)
 
 	/* High Speed is set, there are two types: 52MHz and 26MHz */
 	if (cardtype & EXT_CSD_CARD_TYPE_52) {
-		if (cardtype & EXT_CSD_CARD_TYPE_DDR_52)
+		if (cardtype & EXT_CSD_CARD_TYPE_DDR_1_8V)
 			mmc->card_caps |= MMC_MODE_DDR_52MHz;
 		mmc->card_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
 	} else {