All of lore.kernel.org
 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 V2 1/3] mmc: sdhci-pltfm: Add DT properties to set various QUIRKS
Date: Fri, 6 Nov 2015 13:56:02 -0500	[thread overview]
Message-ID: <1446836164-16259-2-git-send-email-alcooperx@gmail.com> (raw)
In-Reply-To: <1446836164-16259-1-git-send-email-alcooperx@gmail.com>

Add support for "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 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 87fb5ea..cc0730c 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,8 @@ 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-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-06 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 18:56 [PATCH V2 0/3] Add SDHCI driver for Broadcom BRCMSTB/BMIPS Soc's Al Cooper
2015-11-06 18:56 ` Al Cooper [this message]
2015-11-12  9:35   ` [PATCH V2 1/3] mmc: sdhci-pltfm: Add DT properties to set various QUIRKS Ulf Hansson
2015-11-12 19:44     ` Alan Cooper
2015-11-13  9:31       ` Ulf Hansson
2015-11-16 23:43         ` Alan Cooper
2015-11-06 18:56 ` [PATCH V2 2/3] mmc: Add Device Tree binding supported by sdhci-pltfm.c Al Cooper
2015-11-06 18:56 ` [PATCH V2 3/3] mmc: sdhci-brcmstb: Add sdhci driver for Broadcom BRCMSTB/BMIPS SOCs Al Cooper
2015-11-12  1:37 ` [PATCH V2 0/3] Add SDHCI driver for Broadcom BRCMSTB/BMIPS Soc's Florian Fainelli

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=1446836164-16259-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 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.