Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 9, 2015 at 12:53 AM, Dov Levenglick <dovl@xxxxxxxxxxxxxx> wrote:
>> On Sun, Jun 7, 2015 at 10:32 AM,  <ygardi@xxxxxxxxxxxxxx> wrote:
>>>> 2015-06-05 5:53 GMT+09:00  <ygardi@xxxxxxxxxxxxxx>:

[...]

>>> 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-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux