From 58cc0eb274cf14682b1d84cac38ee43885c69706 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 8 Feb 2012 10:56:27 +0100 Subject: [PATCH] mci: use card type definitions Signed-off-by: Sascha Hauer --- drivers/mci/mci-core.c | 4 ++-- include/mci.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index e9fe87ca4..db69b276b 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 87c7194fa..6d8468cc3 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 */