linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Cooper <alcooperx@gmail.com>
To: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Cc: Al Cooper <alcooperx@gmail.com>
Subject: [PATCH 2/4] mmc: sdhci-pltfm: Add DT properties to set various QUIRKS
Date: Thu, 5 Nov 2015 17:39:58 -0500	[thread overview]
Message-ID: <1446763200-10234-2-git-send-email-alcooperx@gmail.com> (raw)
In-Reply-To: <1446763200-10234-1-git-send-email-alcooperx@gmail.com>

Add support for "broken-sdr50", "broken-ddr50", "broken-64-bit-dma"
and "broken-timeout-value" device tree properties.
The properties will cause the corresponding quirks bits to be set.
This allows some of the platform specific QUIRKS setting to be
moved out of the driver and into the Device Tree node.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
 drivers/mmc/host/sdhci-pltfm.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 87fb5ea..81eb4d2 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -90,10 +90,14 @@ void sdhci_get_of_property(struct platform_device *pdev)
 	if (of_get_property(np, "no-1-8-v", NULL))
 		host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
 
+	if (of_get_property(np, "broken-64-bit-dma", NULL))
+		host->quirks2 |= SDHCI_QUIRK2_BROKEN_64_BIT_DMA;
+
 	if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc"))
 		host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
 
-	if (of_device_is_compatible(np, "fsl,p2020-esdhc") ||
+	if (of_get_property(np, "broken-timeout-value", NULL) ||
+	    of_device_is_compatible(np, "fsl,p2020-esdhc") ||
 	    of_device_is_compatible(np, "fsl,p1010-esdhc") ||
 	    of_device_is_compatible(np, "fsl,t4240-esdhc") ||
 	    of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
@@ -106,6 +110,10 @@ void sdhci_get_of_property(struct platform_device *pdev)
 
 	if (of_find_property(np, "enable-sdio-wakeup", NULL))
 		host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
+	if (of_find_property(np, "broken-sdr50", NULL))
+		host->quirks2 |= SDHCI_QUIRK2_BROKEN_SDR50;
+	if (of_find_property(np, "broken-ddr50", NULL))
+		host->quirks2 |= SDHCI_QUIRK2_BROKEN_DDR50;
 }
 #else
 void sdhci_get_of_property(struct platform_device *pdev) {}
-- 
1.9.0.138.g2de3478


  reply	other threads:[~2015-11-05 23:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 22:39 [PATCH 1/4] mmc: Add quirk to disable SDR50 mode Al Cooper
2015-11-05 22:39 ` Al Cooper [this message]
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

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=1446763200-10234-2-git-send-email-alcooperx@gmail.com \
    --to=alcooperx@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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 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).