Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754894AbbG1BH1 (ORCPT ); Mon, 27 Jul 2015 21:07:27 -0400 Received: from regular1.263xmail.com ([211.150.99.134]:53685 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753316AbbG1BHZ (ORCPT ); Mon, 27 Jul 2015 21:07:25 -0400 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:0;ATT:0;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: linux-arm-kernel@lists.infradead.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] mmc: sdhci-of-arasan: Get quirks from device tree To: monstr@monstr.eu, Ulf Hansson References: <1437984249-18332-1-git-send-email-shawn.lin@rock-chips.com> <55B5EA96.6020604@monstr.eu> Cc: linux-mmc@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, =?UTF-8?Q?S=c3=b6ren_Brinkmann?= , linux-arm-kernel@lists.infradead.org From: Shawn Lin Message-ID: <55B6D5C2.4080907@rock-chips.com> Date: Tue, 28 Jul 2015 09:07:14 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55B5EA96.6020604@monstr.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2373 Lines: 64 On 2015/7/27 16:23, Michal Simek wrote: > On 07/27/2015 10:04 AM, Shawn Lin wrote: >> 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 >> --- >> >> 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)) { > This is not documented anywhere that's why you should send binding to DT > mailing list and get ACK for it. Thanks, Michal. You'r right, and forgive me, a green hand, for my inappropriate patch. >> + 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; >> > Also is there any binding which is done in this way? Thanks. BTW: I got a FPGA board w/ a sdhci-arasn emmc controller & PHY IP which can support emmc version 5.1. But I cannot find any documented details from IP databook for the vendor version, such as "sdhci-4.9a". The only one is "ACS eMMC5.1 PHY IP uses TSMC ESD I/O protection structures TMSC product name tphn28hpcgv2od3 Version 120a". Is "sdhci-120a" the version if I add a compatib node? Kindly hope you can elaborate more :) > Thanks, > Michal > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/