summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatt Reimer <mreimer@sdgsystems.com>2015-02-19 11:22:53 -0700
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>2015-02-23 19:52:00 +0200
commitf88a429f1179c9d9ab2883fba0ed0aa13c9bd72e (patch)
treea9b67b3b9dfbe4a2027f9fd58c16a68ef1cd149b /drivers
parent34dd928492fa020455d9b9f59fe4b643c0708306 (diff)
downloadtalos-obmc-uboot-f88a429f1179c9d9ab2883fba0ed0aa13c9bd72e.tar.gz
talos-obmc-uboot-f88a429f1179c9d9ab2883fba0ed0aa13c9bd72e.zip
mmc: sdhci: fix bus width switching on Samsung SoCs
Fix bus width switching from 8-bit mode down to 4-bit or 1-bit modes on Samsung SoCs using SDHCI_QUIRK_USE_WIDE8. These SoCs report controller version 2.0 yet they support 8-bit bus widths. If 8-bit mode was previously enabled and then an operation like "mmc dev" caused a switch back down to 4-bit or 1-bit mode, WIDE8 was left set, causing failures. This problem was manifested by "mmc dev" timing out. Signed-off-by: Matt Reimer <mreimer@sdgsystems.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/sdhci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index de88e19609..82d7984a51 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -374,7 +374,8 @@ static void sdhci_set_ios(struct mmc *mmc)
(host->quirks & SDHCI_QUIRK_USE_WIDE8))
ctrl |= SDHCI_CTRL_8BITBUS;
} else {
- if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300)
+ if ((SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) ||
+ (host->quirks & SDHCI_QUIRK_USE_WIDE8))
ctrl &= ~SDHCI_CTRL_8BITBUS;
if (mmc->bus_width == 4)
ctrl |= SDHCI_CTRL_4BITBUS;
OpenPOWER on IntegriCloud