summaryrefslogtreecommitdiff
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-02-06 15:12:56 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2015-06-01 10:07:13 +0300
commit3853a042325e8f497c199020979c4fc824528c6e (patch)
tree8951d8e430ffc70e047120c9d845b1995ab6b31c /drivers/mmc/core
parente23350b35deb77ef8e33c35dbb0ed1dab9e8ab86 (diff)
downloadlinux-3853a042325e8f497c199020979c4fc824528c6e.tar.xz
mmc: core: Record card drive strength
In preparation for adding drive strength support for eMMC, add drive_strength to struct mmc_card to record the card drive strength for UHS-I modes and HS200 / HS400. For eMMC this will be needed when switching between HS200 and HS400. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/sd.c3
-rw-r--r--drivers/mmc/core/sdio.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 9771b84db4b3..b99e25b9bcdc 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -389,6 +389,8 @@ static int sd_select_driver_type(struct mmc_card *card, u8 *status)
int card_drv_type, drive_strength, drv_type;
int err;
+ card->drive_strength = 0;
+
card_drv_type = card->sw_caps.sd3_drv_type | SD_DRIVER_TYPE_B;
drive_strength = mmc_select_drive_strength(card,
@@ -404,6 +406,7 @@ static int sd_select_driver_type(struct mmc_card *card, u8 *status)
mmc_hostname(card->host));
return 0;
}
+ card->drive_strength = drive_strength;
}
if (drv_type)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 73b091331c96..b91abedcfdca 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -406,6 +406,8 @@ static void sdio_select_driver_type(struct mmc_card *card)
unsigned char card_strength;
int err;
+ card->drive_strength = 0;
+
card_drv_type = card->sw_caps.sd3_drv_type | SD_DRIVER_TYPE_B;
drive_strength = mmc_select_drive_strength(card,
@@ -427,6 +429,7 @@ static void sdio_select_driver_type(struct mmc_card *card)
card_strength, NULL);
if (err)
return;
+ card->drive_strength = drive_strength;
}
if (drv_type)