aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio.c
diff options
context:
space:
mode:
authorKyle Roeschley <kyle.roeschley@ni.com>2018-04-13 16:54:57 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2018-05-02 15:08:44 +0200
commit247cfe53557524a94dd1001d19e5aa50bd5aca81 (patch)
tree73c891362517c86cc25e5fc85b1ee48188a1a6aa /drivers/mmc/core/sdio.c
parentmmc: Remove depends on HAS_DMA in case of platform dependency (diff)
downloadlinux-dev-247cfe53557524a94dd1001d19e5aa50bd5aca81.tar.xz
linux-dev-247cfe53557524a94dd1001d19e5aa50bd5aca81.zip
mmc: core: Add capability to avoid 3.3V signaling
Some SD host controllers cannot handle extended use of 3.3V signaling. To accommodate these controllers, add a capability that requires us to negotiate the voltage down from 3.3V during card initialization. Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com> Signed-off-by: Jennifer Dahm <jennifer.dahm@ni.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r--drivers/mmc/core/sdio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 24b510b743da..87e53a721a10 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -792,6 +792,14 @@ try_again:
if (err)
goto remove;
}
+
+ if (host->caps2 & MMC_CAP2_AVOID_3_3V &&
+ host->ios.signal_voltage == MMC_SIGNAL_VOLTAGE_330) {
+ pr_err("%s: Host failed to negotiate down from 3.3V\n",
+ mmc_hostname(host));
+ err = -EINVAL;
+ goto remove;
+ }
finish:
if (!oldcard)
host->card = card;