All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-of-arasan: Get quirks from device tree
@ 2015-07-27  8:04 ` Shawn Lin
  0 siblings, 0 replies; 12+ messages in thread
From: Shawn Lin @ 2015-07-27  8:04 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sören Brinkmann, Michal Simek, linux-arm-kernel, linux-mmc,
	linux-kernel, Shawn Lin

This patch adds the interface to get quirks from dts, and
there is no need to assign different quirks by condition statement
of arasan IP version.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

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

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index ef5a7d2..db07788 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -132,6 +132,7 @@ static SIMPLE_DEV_PM_OPS(sdhci_arasan_dev_pm_ops, sdhci_arasan_suspend,
 static int sdhci_arasan_probe(struct platform_device *pdev)
 {
 	int ret;
+	u32 quirktab[2];
 	struct clk *clk_xin;
 	struct sdhci_host *host;
 	struct sdhci_pltfm_host *pltfm_host;
@@ -172,6 +173,12 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 		goto clk_disable_all;
 	}
 
+	if (of_property_read_u32_array(pdev->dev.of_node,
+				       "arasan,quirks", &quirktab[0], 2)) {
+		host->quirks |= quirktab[0];
+		host->quirks2 |= quirktab[1];
+	}
+
 	if (of_device_is_compatible(pdev->dev.of_node, "arasan,sdhci-4.9a")) {
 		host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT;
 		host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
-- 
2.3.7



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

end of thread, other threads:[~2015-07-28  5:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27  8:04 [PATCH] mmc: sdhci-of-arasan: Get quirks from device tree Shawn Lin
2015-07-27  8:04 ` Shawn Lin
2015-07-27  8:23 ` Michal Simek
2015-07-27  8:23   ` Michal Simek
2015-07-28  1:07   ` Shawn Lin
2015-07-28  1:07     ` Shawn Lin
2015-07-28  5:46     ` Michal Simek
2015-07-28  5:46       ` Michal Simek
2015-07-27 15:19 ` Lars-Peter Clausen
2015-07-27 15:19   ` Lars-Peter Clausen
2015-07-28  0:51   ` Shawn Lin
2015-07-28  0:51     ` Shawn Lin

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.