All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu CASTET <matthieu.castet@parrot.com>
To: linux-mmc@vger.kernel.org
Cc: Giuseppe CAVALLARO <peppe.cavallaro@st.com>,
	Chris Ball <cjb@laptop.org>, Dong Aisheng <b29396@freescale.com>
Subject: SDHCI DDR50 implies MMC DDR
Date: Fri, 18 Apr 2014 15:55:39 +0200	[thread overview]
Message-ID: <20140418155539.5d43a9c8@parrot.com> (raw)

[-- 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


                 reply	other threads:[~2014-04-18 13:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140418155539.5d43a9c8@parrot.com \
    --to=matthieu.castet@parrot.com \
    --cc=b29396@freescale.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.