From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757354AbcHYTEJ (ORCPT ); Thu, 25 Aug 2016 15:04:09 -0400 Received: from mail-co1nam03on0133.outbound.protection.outlook.com ([104.47.40.133]:17123 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756179AbcHYTDi (ORCPT ); Thu, 25 Aug 2016 15:03:38 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=zach.brown@ni.com; Date: Thu, 25 Aug 2016 13:26:22 -0500 From: Zach Brown To: Mark Rutland CC: , , , , , , , , , Subject: Re: [PATCH 1/2] sdhci-of-arasan: Add quirk and device tree parameter to fake CD bit Message-ID: <20160825182621.GA14817@zach-desktop> References: <1472080984-17373-1-git-send-email-zach.brown@ni.com> <20160825105640.GA5439@remoulade> <20160825171539.GA13571@zach-desktop> <20160825180959.GA14705@remoulade> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160825180959.GA14705@remoulade> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [130.164.62.11] X-ClientProxiedBy: MWHPR07CA0015.namprd07.prod.outlook.com (10.172.94.25) To BN3PR0401MB1442.namprd04.prod.outlook.com (10.161.210.20) X-MS-Office365-Filtering-Correlation-Id: f8a42954-d589-4e64-e5ad-08d3cd15554e X-Microsoft-Exchange-Diagnostics: 1;BN3PR0401MB1442;2:trg+OTnNIPHelo2yayslcOrwJk6zgYl+I0pvqTsV8/AuieGhd4BXaua/DszTDVFmZj1npqPm5X/gFM+BedsNP9e411u3EPg0BYDQGLCGyoCLG1aWK8LbQFg7vSWqin/GMV5E18cWNVcSA6xCMdCL0jj3kQWXbyFCyzSJB63zEORYK5UKrtnjW078gUB1Ak6H;3:zt69ldalKs9EsJogLEnp3OuwlPuDYJRijyib3gHbtitSGzwrLKU4TLYrC07Hya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y4+kayhwPXeoF6llwhvR1z9DU5KmXmPBXyrjRf1kkuMkMJBL2kNq2mj3JxUc2UW7pOwdCltUH3y4i9U2uusL64cr5CdXbhsZc69p47P/wDlFg1IhncwoXj8a2g49GK0L/WMrWBbl5KJ72yhk+dbkQQQN4GPNB49EW7jSPStYCwNIMtmMkyDFtsd3gYm4Rx9Ds115HaGfSGCLQbLaXTB+3ZO6aDnvW3KOQUhwsNoLnYUsg2daUhaZIS1Hm5qVi7vfhzB9+NBdeta4xv7I2ScD88wwizbbMfISAcXEG8PXrQUaWriermT5C11YI1J4Ed0MIueKJIy90G2oDXg9u5xuPRHAtnUitcXZIP46cWmffGp7We59T5o= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:BN3PR0401MB1442;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0401MB1442; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0401MB1442;4:FUckLOzfPJZD4dp0kS1MbJQuUihH3qiy4VFjzbLgMMaRfqk5TNKr3twMW2M2Xgj8EDU8f5Ti0yGqHc89zcW2SjI5Kk44Dl+7/dq+E053HXaJ8OgguJmQtRaRoD982Dw0bHejMmI5Zv259/Uk9kwGT1XmcJO3Srtx/ZE1MBOjGstfl5ImT4CNZKaQ+BWmgcP4imckI9idkcOEAbxnH9eHU0kYNeqAwcKqxG3i7M0mQtt0nabjgKZJlbDoy60Py4zy/OMGl0me6sXT5c8xNmXJAQ7ZvCSa6uKgskCvP/aywUg3hoO7yDQWK56CdnerkupkUpZArZAmvEjpWU3d5d92bgSRKZCPrUhNkf1FYx7+qiLAb51scIvvobFy3pMvaXiWr7rG+TlyMN+ztkzx4CPqdA== X-Forefront-PRVS: 0045236D47 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(24454002)(51444003)(189002)(42186005)(66066001)(106356001)(101416001)(92566002)(1076002)(47776003)(54356999)(19580395003)(2906002)(8676002)(86362001)(586003)(76176999)(77096005)(105586002)(81156014)(46406003)(81166006)(50466002)(2950100001)(97756001)(4326007)(50986999)(6116002)(3846002)(23726003)(5660300001)(33716001)(9686002)(83506001)(8666005)(4001350100001)(97736004)(7846002)(7736002)(68736007)(305945005)(93886004)(7416002)(110136002)(230783001)(189998001)(33656002)(18370500001)(7059030)(107986001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0401MB1442;H:zach-desktop;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0401MB1442;23:YNCkVg1b8euAoHP++Qw2FG6sqnl3bKAK75YUFFG?= =?us-ascii?Q?RWydow/OHcHp84Om+ZpBcU4rr4ERlxgke66iyP5Lk2nuQ9I2kQyI/zAlkFiw?= =?us-ascii?Q?3+MlJzHmIidPtajmkjjYbK0deJgIeZGp3CAYHKEXbQ2UxZXoL7j5/jiyT16T?= =?us-ascii?Q?lrO1DWbNPzGZodvVXBYZ3e7rm5/PSczspdq8eePpykv1OoWiVJRbcfJX+Gq2?= =?us-ascii?Q?WLz22aFxbtHtjFP2/m+cJsuCu5cMhWemWD0uL+cxrrK+TUsrJoZ5XDdjJ+6X?= =?us-ascii?Q?0/j7vdntvki1ToxGAErrUgcnd8NSfEJyFvWds6VoQznGV3xqE49/cZaQm5e2?= =?us-ascii?Q?7XMNdWjcC0AheFF543P3+afcPlr27dCbuc9XEks9q+HESo/H2INFwu32+N7N?= =?us-ascii?Q?lqNAlZTHhnV4lAgGm5VpDj8u/pPUp5gJQP3MGAL0KL8PACuv5H+vxAVZ5vWM?= =?us-ascii?Q?8Z8AQt/BbgEVYbsYKZ2cB1OJiOQqHrKwjWYZZi49FnJ0BD3kchZbaGoXBrYH?= =?us-ascii?Q?HCfjnUnJIn6pJ2s2S+5RP629lxWYLf1Sr8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Vy5XpC0SFtmm0KCzjYkfpT3/4Ys6+v9V0XRGHnH5669Nj1XvH8VLLNodC5FUpPfemVJgHZZs/e7pKoSeAXiF3g6L2UGmGiuOziAVFF++8YXM+mwh30hNNcKJgA8vOUeppbxcknyiTbdTDaCwO7adJR4bx5NMKunKhEbPdLKqnxlWpoyQxgFj9a0cv33fZGi4Y9M=;5:duP24hDDF0wy9mzFYoieCw66rcoR2JOqGE/28+mu3+N3N61bQF1H6UOc7I8ZsZ1RDttaym0bKk0rCSCt6JKhiPMnbmV58t4dHDfBjVe7+1QK6l2yGFRMUAJwXbb23KowHS0lcpUDDSnFVhoJjNDzqg==;24:gAEbYF27Duet4Er3kDerWNNIItL6YFw5tvgNBi1PWDRNfhIXnbfzmS83Fk9qlghDGXAqtcNeDLXhx9KROLmCzO0ZAWjCTuMEAQk51xo7Yfc=;7:sDnIusv38NpSVZd6j2HGJOp2byi+gTD2TV7/ASl312FlNG9YmMGilTuouh0Lpp8MTCDN0ln+6FgI7iOX8rU8uJXoIEUdb+M+PjQ3WS08EzHmIVHfFnPJjKiMFbWJvXnrLsiiZCHTx0CoRVzC3hyWtkKXses1QEhXoQyCsu5UpNweLUm31JdedXVcgnSgGvE4ETKhKo4uDeNmZyrL8d8OjtkFW5NFSrzat7fEatK0gGOjT7QBRAb80Y2wSyXqRTPp SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ni.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2016 18:26:28.1009 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0401MB1442 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 25, 2016 at 07:10:00PM +0100, Mark Rutland wrote: > On Thu, Aug 25, 2016 at 12:15:44PM -0500, Zach Brown wrote: > > On Thu, Aug 25, 2016 at 11:56:55AM +0100, Mark Rutland wrote: > > > On Wed, Aug 24, 2016 at 06:23:03PM -0500, Zach Brown wrote: > > > > +- fake-cd: On Zynq Devices the SDHCI Controller will not work without the cd > > > > + bit. When this option is set the driver will put the controller in test mode > > > > + and fake the cd bit so it will function. > > > > > > As Lars noted, the DT should describe the HW, and the policy of how to deal > > > with that should be left to the kernel. So from a DT perspective the above is > > > not correct. > > > > > > If I understand the linked documentation, this is slightly different to typical > > > uses of broken-cd in that in the absence of a card detect signal the HW will > > > not be able to access the SD card at all, even if requested to. Is that correct? > > > > > > If so, perhaps a better option is to have the combination of broken-cd and the > > > compatible string for this IP block imply that the test mode workaround is > > > required. Obviously that requires a fixup to the usual broken-cd binding to > > > remove the implication that polling alone must be used. > > > > > > Thanks, > > > Mark. > > > > In cases where the card is non-removable then polling doesn't make sense. > > We have the non-removable property to describe that, so we can also look at that. > > > So it doesn't make sense to tie the test mode workaround into the broken-cd > > property, even though I agree the nature of the defect fits under the notion > > of the CD being broken. > > Maybe not solely on broken-cd, but I think that we dont necessarily need a new > DT property. As above, broken-cd, non-removable, and the compatible string may > together give the kernel enough information to choose the right thing to do. > > Thanks, > Mark. I'm not sure if I understand your suggestion completely. Are you suggesting setting both the broken-cd and non-removable properties? That would make sense, but my understanding was that the two properities are not meant to co-exist. In /Documentation/devicetree/bindings/mmc/mmc.txt it states that only one should be supplied. Don't the two properties conflict with each other?