linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mmc: Add quirk to disable SDR50 mode
@ 2015-11-05 22:39 Al Cooper
  2015-11-05 22:39 ` [PATCH 2/4] mmc: sdhci-pltfm: Add DT properties to set various QUIRKS Al Cooper
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Al Cooper @ 2015-11-05 22:39 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc, bcm-kernel-feedback-list; +Cc: Al Cooper

Add quirk to disable SDR50 mode for controllers/boards that have
problems with this mode.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
 drivers/mmc/host/sdhci.c | 3 +++
 drivers/mmc/host/sdhci.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index b48565e..71067c7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3176,6 +3176,9 @@ int sdhci_add_host(struct sdhci_host *host)
 	} else if (caps[1] & SDHCI_SUPPORT_SDR50)
 		mmc->caps |= MMC_CAP_UHS_SDR50;
 
+	if (host->quirks2 & SDHCI_QUIRK2_BROKEN_SDR50)
+		mmc->caps &= ~MMC_CAP_UHS_SDR50;
+
 	if (host->quirks2 & SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 &&
 	    (caps[1] & SDHCI_SUPPORT_HS400))
 		mmc->caps2 |= MMC_CAP2_HS400;
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 9d4aa31..0941c94 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -412,6 +412,8 @@ struct sdhci_host {
 #define SDHCI_QUIRK2_ACMD23_BROKEN			(1<<14)
 /* Broken Clock divider zero in controller */
 #define SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN		(1<<15)
+/* Controller does not support SDR50 */
+#define SDHCI_QUIRK2_BROKEN_SDR50			(1<<16)
 /*
  * When internal clock is disabled, a delay is needed before modifying the
  * SD clock frequency or enabling back the internal clock.
-- 
1.9.0.138.g2de3478


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-11-09 18:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 22:39 [PATCH 1/4] mmc: Add quirk to disable SDR50 mode Al Cooper
2015-11-05 22:39 ` [PATCH 2/4] mmc: sdhci-pltfm: Add DT properties to set various QUIRKS Al Cooper
2015-11-05 22:39 ` [PATCH 3/4] mmc: Add Device Tree binding supported by sdhci-pltfm.c Al Cooper
2015-11-05 22:40 ` [PATCH 4/4] mmc: sdhci-brcmstb: Add sdhci driver for Broadcom BRCMSTB/BMIPS SOCs Al Cooper
2015-11-06  8:14 ` [PATCH 1/4] mmc: Add quirk to disable SDR50 mode Ulf Hansson
2015-11-06 14:07   ` Alan Cooper
2015-11-06 23:55   ` Scott Branden
2015-11-07  0:09     ` Florian Fainelli
2015-11-09 10:45     ` Ulf Hansson
2015-11-09 18:15       ` Scott Branden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).