Skip to content
Snippets Groups Projects
Commit a2565e09 authored by Ong Boon Leong's avatar Ong Boon Leong Committed by Bruce Ashfield
Browse files

valleyisland-io: Force BYT SDCARD host to run with SDR25


SD Card v3.01 in the market is not compatible with BYT SDHC IP
in SoC because this IP only support SD v3.0 only. So, we are
forcing DDR50 mode to always step down to SDR25.

Signed-off-by: default avatarOng Boon Leong <boon.leong.ong@intel.com>
parent 3e603b2f
No related branches found
No related tags found
No related merge requests found
From 2a04e9579aaebe6263e9f32bb6b507c9c451cc83 Mon Sep 17 00:00:00 2001
From: Chew, Kean Ho <kean.ho.chew@intel.com>
Date: Mon, 23 Dec 2013 16:14:27 +0800
Subject: [PATCH 17/17] mmc: sdhci: Force BYT SDCARD host to run with SDR25
mode
SD Card v3.01 in the market is not compatible with BYT SDHC IP in SoC
because this IP only support SD v3.0 only. So, we are forcing DDR50 mode
to always step down to SDR25.
Signed-off-by: Chew, Kean Ho <kean.ho.chew@intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
---
drivers/mmc/host/sdhci-acpi.c | 3 ++-
drivers/mmc/host/sdhci-pci.c | 3 ++-
drivers/mmc/host/sdhci.c | 3 ++-
include/linux/mmc/sdhci.h | 3 ++
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 119568f..11acee1 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -130,7 +130,8 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {
static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sd = {
.flags = SDHCI_ACPI_SD_CD | SDHCI_ACPI_RUNTIME_PM,
- .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON,
+ .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
+ SDHCI_QUIRK2_BROKEN_DDR50,
};
struct sdhci_acpi_uid_slot {
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 33593e7..8848182 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -354,7 +354,8 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {
};
static const struct sdhci_pci_fixes sdhci_intel_byt_sd = {
- .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON,
+ .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
+ SDHCI_QUIRK2_BROKEN_DDR50,
.allow_runtime_pm = true,
.own_cd_for_runtime_pm = true,
};
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 22d91ec..10bd57d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2972,7 +2972,8 @@ int sdhci_add_host(struct sdhci_host *host)
else if (caps[1] & SDHCI_SUPPORT_SDR50)
mmc->caps |= MMC_CAP_UHS_SDR50;
- if (caps[1] & SDHCI_SUPPORT_DDR50)
+ if ((caps[1] & SDHCI_SUPPORT_DDR50) &&
+ !(host->quirks2 & SDHCI_QUIRK2_BROKEN_DDR50))
mmc->caps |= MMC_CAP_UHS_DDR50;
/* Does the host need tuning for SDR50? */
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index ba35bdb..7c9d2d1 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -96,6 +96,9 @@ struct sdhci_host {
#define SDHCI_QUIRK2_NO_1_8_V (1<<2)
#define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3)
#define SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON (1<<4)
+/* bit 5 is used by SDHCI_QUIRK2_BROKEN_HOST_CONTROL in upstream */
+/* Controller has a broken DDR50 Time Spec */
+#define SDHCI_QUIRK2_BROKEN_DDR50 (1<<6)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
--
1.7.4.4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment