All of lore.kernel.org
 help / color / mirror / Atom feed
* SDHCI DDR50 implies MMC DDR
@ 2014-04-18 13:55 Matthieu CASTET
  0 siblings, 0 replies; only message in thread
From: Matthieu CASTET @ 2014-04-18 13:55 UTC (permalink / raw)
  To: linux-mmc; +Cc: Giuseppe CAVALLARO, Chris Ball, Dong Aisheng

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

Hi,

shouldn't we add something like that do auto-detect MMC_CAP_1_8V_DDR on
sdhci controller ?


Matthieu

[-- Attachment #2: 0001-sdhci-UHS-DDR50-implies-MMC-DDR.patch --]
[-- Type: text/x-patch, Size: 937 bytes --]

>From f821501dada7041521fe80a5fe92bdc8b15f055b Mon Sep 17 00:00:00 2001
From: Matthieu CASTET <matthieu.castet@parrot.com>
Date: Fri, 18 Apr 2014 15:49:05 +0200
Subject: [PATCH] sdhci : UHS DDR50 implies MMC DDR

---
 drivers/mmc/host/sdhci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9a79fc4..2b7478e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2971,6 +2971,11 @@ int sdhci_add_host(struct sdhci_host *host)
 	if (caps[0] & SDHCI_CAN_DO_HISPD)
 		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
+	/* DDR50 implies MMC DDR at 1.8 or 3.3 */
+	if ((caps[1] & SDHCI_SUPPORT_DDR50) &&
+		!(host->quirks2 & SDHCI_QUIRK2_BROKEN_DDR50))
+		mmc->caps |= MMC_CAP_1_8V_DDR;
+
 	if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
 	    !(host->mmc->caps & MMC_CAP_NONREMOVABLE))
 		mmc->caps |= MMC_CAP_NEEDS_POLL;
-- 
1.9.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-18 13:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 13:55 SDHCI DDR50 implies MMC DDR Matthieu CASTET

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.