linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dov Levenglick <dovl-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Yaniv Gardi <ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Akinobu Mita
	<akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	merez-Rm6X0d1/PG5y9aJCnZT0Uw@public.gmane.org,
	dovl-Rm6X0d1/PG5y9aJCnZT0Uw@public.gmane.org,
	Jej B
	<james.bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm
	<linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Santosh Y <santoshsy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-scsi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Subhash Jadavani
	<subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>,
	Gilad Broner <gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Vinayak Holikatti
	<vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"James E.J. Bottomley" <jbottomley-wo1vFcy6AUs@public.gmane.org>,
	Dolev Raviv <draviv-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	Sujit Reddy Thumma
	<sthumma-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Raviv Shvili <rshvili>
Subject: Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device
Date: Tue, 9 Jun 2015 07:53:28 -0500	[thread overview]
Message-ID: <CAL_Jsq+SWq9=xTjVvQH2tMoq=g_rjk44A7T4TMFKvDiUp_ahCg@mail.gmail.com> (raw)
In-Reply-To: <bfade46f9d953e10240acb835105b81d.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org>

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

[...]

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

  parent reply	other threads:[~2015-06-09 12:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03  9:37 [PATCH v2 0/4] fixing building errors and warnings when components Yaniv Gardi
2015-06-03  9:37 ` [PATCH v2 1/4] phy: qcom-ufs: fix build error when the component is built as a module Yaniv Gardi
2015-06-03  9:37 ` [PATCH v2 2/4] scsi: ufs-qcom: fix compilation warning if compiled " Yaniv Gardi
2015-06-03  9:37 ` [PATCH v2 3/4] scsi: ufs-qcom: update configuration option of SCSI_UFS_QCOM component Yaniv Gardi
2015-06-03  9:37 ` [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device Yaniv Gardi
2015-06-04 14:07   ` Paul Bolle
2015-06-04 14:42     ` Paul Bolle
2015-06-04 20:42     ` ygardi
2015-06-07 15:22     ` ygardi-sgV2jX0FEOL9JmXXK+q4OQ
2015-06-04 14:32   ` Akinobu Mita
2015-06-04 20:53     ` ygardi
2015-06-05 16:47       ` Akinobu Mita
2015-06-07 15:32         ` ygardi
2015-06-08 14:47           ` Akinobu Mita
2015-06-08 15:02           ` Rob Herring
2015-06-09  5:53             ` Dov Levenglick
     [not found]               ` <bfade46f9d953e10240acb835105b81d.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org>
2015-06-09 12:53                 ` Rob Herring [this message]
2015-06-17  7:42                   ` Dov Levenglick
2015-06-17 12:46                     ` Rob Herring
2015-06-17 13:17                       ` Dov Levenglick
2015-06-17 13:37                         ` Rob Herring
2015-06-17 14:21                           ` Dov Levenglick
2015-06-17 14:31                             ` James Bottomley
2015-06-17 14:38                               ` Dov Levenglick
     [not found]     ` <CAC5umyis6HU06KU-aSGoy6mCt-u+5Pz16nDk1qHrcsTnFo_2hA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-08 14:51       ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_Jsq+SWq9=xTjVvQH2tMoq=g_rjk44A7T4TMFKvDiUp_ahCg@mail.gmail.com' \
    --to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dovl-Rm6X0d1/PG5y9aJCnZT0Uw@public.gmane.org \
    --cc=dovl-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=draviv-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=james.bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
    --cc=jbottomley-wo1vFcy6AUs@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=merez-Rm6X0d1/PG5y9aJCnZT0Uw@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=santoshsy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=sthumma-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).