diff options
| author | Sahitya Tummala <stummala@codeaurora.org> | 2013-04-12 12:11:20 +0530 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-27 10:28:36 -0700 |
| commit | 3ee34aae161d82aefe775805a8ce66caffbe5569 (patch) | |
| tree | 95838dcd68c9412ed8a52e121a6363ee04c27e9f | |
| parent | 61b4aff312c9c4d483b3355ec7e4f29c17d56f9c (diff) | |
mmc: sdhci-msm: Do not enable preset value
If preset value (bit 15) is enabled in sdhci host control2
register (0x3E), then the preset value registers(0x6F-0x60)
would be used for some of the settings such as clock and
drive strength. These are HW initialized registers and are
not properly initialized by MSM SDHCI controller. This is
resulting in low throughput for some of the modes such as
DDR50/SDR50. Hence, do not enable it for MSM SDHCI.
CRs-fixed: 474518
Change-Id: Iee1241355d14e6bcebc66c3a43abf1ec94d869c3
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
[subhashj@codeaurora.org: fixed minor merge conflict]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
| -rw-r--r-- | drivers/mmc/host/sdhci-msm.c | 1 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 3 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci.h | 7 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 4759927abff4..ab15b402f3b2 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2174,6 +2174,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) host->quirks2 |= SDHCI_QUIRK2_IGNORE_CMDCRC_FOR_TUNING; host->quirks2 |= SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE; host->quirks2 |= SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD; + host->quirks2 |= SDHCI_QUIRK2_BROKEN_PRESET_VALUE; host_version = readl_relaxed((host->ioaddr + SDHCI_HOST_VERSION)); dev_dbg(&pdev->dev, "Host Version: 0x%x Vendor Version 0x%x\n", diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index c17ac505bc2e..e7b3ea1807e7 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2208,6 +2208,9 @@ static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable) if (host->version < SDHCI_SPEC_300) return; + if (host->quirks2 & SDHCI_QUIRK2_BROKEN_PRESET_VALUE) + return; + /* * We only enable or disable Preset Value if they are not already * enabled or disabled respectively. Otherwise, we bail out. diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 1af827f3556e..1b5ec41e1957 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -446,6 +446,13 @@ struct sdhci_host { */ #define SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD (1<<21) +/* + * The preset value registers are not properly initialized by + * some hardware and hence preset value must not be enabled for + * such controllers. + */ +#define SDHCI_QUIRK2_BROKEN_PRESET_VALUE (1<<22) + int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ |
