Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753785AbbFIMyC (ORCPT ); Tue, 9 Jun 2015 08:54:02 -0400 Received: from mail-vn0-f46.google.com ([209.85.216.46]:39965 "EHLO mail-vn0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946AbbFIMxt (ORCPT ); Tue, 9 Jun 2015 08:53:49 -0400 MIME-Version: 1.0 In-Reply-To: References: <1433324255-27510-1-git-send-email-ygardi@codeaurora.org> <1433324255-27510-5-git-send-email-ygardi@codeaurora.org> <763dbc7b708b5d5b18ce0b5adcc41016.squirrel@www.codeaurora.org> <68c91f08f2be6c84055a303ca8aa3fe0.squirrel@www.codeaurora.org> From: Rob Herring Date: Tue, 9 Jun 2015 07:53:28 -0500 Message-ID: Subject: Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device To: Dov Levenglick Cc: Yaniv Gardi , Akinobu Mita , merez@qti.qualcomm.com, dovl@qti.qualcomm.com, Jej B , LKML , linux-scsi@vger.kernel.org, linux-arm-msm , Santosh Y , linux-scsi-owner@vger.kernel.org, Subhash Jadavani , Paul Bolle , Gilad Broner , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Vinayak Holikatti , "James E.J. Bottomley" , Dolev Raviv , Christoph Hellwig , Sujit Reddy Thumma , Raviv Shvili , Sahitya Tummala , "open list:OPEN FIRMWARE AND..." Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2084 Lines: 48 On Tue, Jun 9, 2015 at 12:53 AM, Dov Levenglick wrote: >> On Sun, Jun 7, 2015 at 10:32 AM, wrote: >>>> 2015-06-05 5:53 GMT+09:00 : [...] >>> If ufshcd-pltfrm driver is loaded before ufs-qcom, (what actually >>> happens >>> always), then the calling to of_platform_populate() which is added, >>> guarantees that ufs-qcom probe will be called and finish, before >>> ufshcd_pltfrm probe continues. >>> so ufs_variant device is always there, and ready. >>> I think it means we are safe - since either way, we make sure ufs-qcom >>> probe will be called and finish before dealing with ufs_variant device >>> in >>> ufshcd_pltfrm probe. >> >> This is due to the fact that you have 2 platform drivers. You should >> only have 1 (and 1 node). If you really think you need 2, then you >> should do like many other common *HCIs do and make the base UFS driver >> a set of library functions that drivers can use or call. Look at EHCI, >> AHCI, SDHCI, etc. for inspiration. > > Hi Rob, > We did look at SDHCI and decided to go with this design due to its > simplicity and lack of library functions. Yaniv described the proper flow > of probing and, as we understand things, it is guaranteed to work as > designed. > > Furthermore, the design of having a subcore in the dts is used in the > Linux kernel. Please have a look at drivers/usb/dwc3 where - as an example > - both dwc3-msm and dwc3-exynox invoke the probing function in core.c > (i.e. the shared underlying Synopsys USB dwc3 core) by calling > of_platform_populate(). That binding has the same problem. Please don't propagate that. There is no point in a sub-node in this case. > Do you see a benefit in the SDHCi implementation? Yes, it does not let the kernel driver design dictate the hardware description. Rob -- 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/