Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752215AbcCYGne (ORCPT ); Fri, 25 Mar 2016 02:43:34 -0400 Received: from mail-db3on0062.outbound.protection.outlook.com ([157.55.234.62]:11232 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751875AbcCYGna convert rfc822-to-8bit (ORCPT ); Fri, 25 Mar 2016 02:43:30 -0400 From: Yangbo Lu To: Scott Wood , Arnd Bergmann , "Rob Herring" CC: "linuxppc-dev@lists.ozlabs.org" , "devicetree@vger.kernel.org" , "ulf.hansson@linaro.org" , Zhao Qiang , Russell King , "Bhupesh Sharma" , "netdev@vger.kernel.org" , Joerg Roedel , Kumar Gala , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yang-Leo Li , "iommu@lists.linux-foundation.org" , "linux-i2c@vger.kernel.org" , Claudiu Manoil , Santosh Shilimkar , Xiaobo Xie , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Thread-Topic: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Thread-Index: AQHRee0YUaXz2V4NZkKHmxv7UGM63p9pzlBg Date: Fri, 25 Mar 2016 06:43:24 +0000 Message-ID: References: <1457518131-11339-1-git-send-email-yangbo.lu@nxp.com> <20160317170101.GA21009@rob-hp-laptop> <3706958.XeRFmKM0K5@wuerfel> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [123.151.195.51] x-ms-office365-filtering-correlation-id: 098f6600-4a69-4c0d-09cd-08d35478c408 x-microsoft-exchange-diagnostics: 1;HE1PR04MB1660;5:o0yLIPT75f0WtSgumu5AW3JSPdrrd37DFY+6psbBdKIulyfiK0X86FIIDh0uPEkqK13xCoWTesSuZ/Z4UGN5FrKsDLaKjZ6Rxx5+op5xQB5oePvbJIRh7dfAaKx9JxpQ557CrHRmm0QIbfw0ht+5ug==;24:GztAQgAZCSxoRE8WXeMOTMI+NI7hq124koA9HqFs9Yffq4Zi7aOOxE24fAASmtqmxEFp6SHNs+sGGjYqetEzlhcPA5vhhzIJFx6CVwcWv1Q= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1660; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:HE1PR04MB1660;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1660; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(35754003)(13464003)(43544003)(24454002)(377454003)(74316001)(19580405001)(86362001)(5004730100002)(3660700001)(87936001)(5001770100001)(33656002)(54356999)(76176999)(122556002)(92566002)(76576001)(189998001)(3280700002)(50986999)(5003600100002)(10400500002)(2906002)(106116001)(3900700001)(93886004)(81166005)(5002640100001)(66066001)(586003)(6116002)(102836003)(5008740100001)(3846002)(1096002)(2900100001)(2950100001)(1220700001)(230783001)(77096005)(4326007)(15975445007)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB1660;H:HE1PR04MB0889.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2016 06:43:24.9010 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1660 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3504 Lines: 84 > -----Original Message----- > From: Scott Wood > Sent: Saturday, March 19, 2016 2:28 AM > To: Arnd Bergmann; Rob Herring > Cc: Yangbo Lu; linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; > ulf.hansson@linaro.org; Zhao Qiang; Russell King; Bhupesh Sharma; > netdev@vger.kernel.org; Joerg Roedel; Kumar Gala; linux- > mmc@vger.kernel.org; linux-kernel@vger.kernel.org; Yang-Leo Li; > iommu@lists.linux-foundation.org; linux-i2c@vger.kernel.org; Claudiu > Manoil; Santosh Shilimkar; Xiaobo Xie; linux-clk@vger.kernel.org; linux- > arm-kernel@lists.infradead.org > Subject: Re: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240- > R1.0-R2.0 > > On 03/17/2016 12:06 PM, Arnd Bergmann wrote: > > On Thursday 17 March 2016 12:01:01 Rob Herring wrote: > >> On Mon, Mar 14, 2016 at 05:45:43PM +0000, Scott Wood wrote: > > > >>>>> This makes the driver non-portable. Better identify the specific > >>>>> workarounds based on the compatible string for this device, or add > >>>>> a boolean DT property for the quirk. > >>>>> > >>>>> Arnd > >>>> > >>>> [Lu Yangbo-B47093] Hi Arnd, we did have a discussion about using DTS > in v1 before. > >>>> https://patchwork.kernel.org/patch/6834221/ > >>>> > >>>> We don't have a separate DTS file for each revision of an SOC and if > we did, we'd constantly have people using the wrong one. > >>>> In addition, the device tree is stable ABI and errata are often > discovered after device tree are deployed. > >>>> See the link for details. > >>>> > >>>> So we decide to read SVR from the device-config/guts MMIO block > other than using DTS. > >>>> Thanks. > >>> > >>> Also note that this driver is already only for fsl-specific > >>> hardware, and it will still work even if fsl_guts doesn't find > >>> anything to bind to > >>> -- it just wouldn't be able to detect errata based on SVR in that > case. > >> > >> IIRC, it is the same IP block as i.MX and Arnd's point is this won't > >> even compile on !PPC. It is things like this that prevent sharing the > >> driver. > > The whole point of using the MMIO SVR instead of the PPC SPR is so that > it will work on ARM... The guts driver should build on any platform as > long as OF is enabled, and if it doesn't find a node to bind to it will > return 0 for SVR, and the eSDHC driver will continue (after printing an > error that should be removed) without the ability to test for errata > based on SVR. > > > I think the first four patches take care of building for ARM, but the > > problem remains if you want to enable COMPILE_TEST as we need for > > certain automated checking. > > What specific problem is there with COMPILE_TEST? > > >> Dealing with Si revs is a common problem. We should have a common > >> solution. There is soc_device for this purpose. > > > > Exactly. The last time this came up, I think we agreed to implement a > > helper using glob_match() on the soc_device strings. Unfortunately > > this hasn't happened then, but I'd still prefer that over yet another > > vendor-specific way of dealing with the generic issue. > > soc_device would require encoding the SVR as a string and then decoding > the string, which is more complicated and error prone than having > platform-specific code test a platform-specific number. And when would > it get registered on arm64, which doesn't have platform code? > > -Scott [Lu Yangbo-B47093] Hi Arnd, could you answer Scott's questions? If you don't oppose this patch, I'd like to rework a new version for merging. Thanks. :)