summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mci/mci-core.c4
-rw-r--r--include/mci.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index e9fe87ca40..db69b276b2 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -417,7 +417,7 @@ static int mmc_change_freq(struct device_d *mci_dev)
if (ext_csd[212] || ext_csd[213] || ext_csd[214] || ext_csd[215])
mci->high_capacity = 1;
- cardtype = ext_csd[196] & 0xf;
+ cardtype = ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_MASK;
err = mci_switch(mci_dev, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1);
@@ -439,7 +439,7 @@ static int mmc_change_freq(struct device_d *mci_dev)
return 0;
/* High Speed is set, there are two types: 52MHz and 26MHz */
- if (cardtype & MMC_HS_52MHZ)
+ if (cardtype & EXT_CSD_CARD_TYPE_52)
mci->card_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
else
mci->card_caps |= MMC_MODE_HS;
diff --git a/include/mci.h b/include/mci.h
index 87c7194fa9..6d8468cc3e 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -102,7 +102,6 @@
#define SD_HIGHSPEED_SUPPORTED 0x00020000
#define MMC_HS_TIMING 0x00000100
-#define MMC_HS_52MHZ 0x2
#define OCR_BUSY 0x80000000
/** card's response in its OCR if it is a high capacity card */