Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373068 > unrolled thread
| Started by | Rob Herring <robh+dt@kernel.org> |
|---|---|
| First post | 2016-04-07 07:00 +0200 |
| Last post | 2016-04-12 18:40 +0200 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup Rob Herring <robh+dt@kernel.org> - 2016-04-07 07:00 +0200
Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup Grygorii Strashko <grygorii.strashko@ti.com> - 2016-04-07 12:30 +0200
Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-04-07 13:20 +0200
Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup Tony Lindgren <tony@atomide.com> - 2016-04-12 17:20 +0200
Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup Tony Lindgren <tony@atomide.com> - 2016-04-07 19:00 +0200
Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup Rob Herring <robh+dt@kernel.org> - 2016-04-12 18:00 +0200
Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup Tony Lindgren <tony@atomide.com> - 2016-04-12 18:40 +0200
| From | Rob Herring <robh+dt@kernel.org> |
|---|---|
| Date | 2016-04-07 07:00 +0200 |
| Subject | Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup |
| Message-ID | <rlacW-6ZO-3@gated-at.bofh.it> |
On Fri, Apr 1, 2016 at 4:40 PM, Tony Lindgren <tony@atomide.com> wrote: > * Tony Lindgren <tony@atomide.com> [160401 14:37]: >> We currently try to match of_dev_auxdata based on compatible, >> IO address, and device name. But in some cases we have multiple >> instances of drivers that can use the same auxdata. >> >> Let's add an additional secondary lookup for generic compatible >> match for auxdata if no device specific match is found. This does >> not change the existing matching, and still allows adding device >> specific auxdata. >> >> This simplifies things as specifying the IO address and device >> name is prone errors as it requires maintaining an in kernel >> database for each SoC. > > And here's what I can apply later on to get rid of some > ifdeffery. > > I'm also planning to move some of the legacy omap hwmod > functionality into proper device drivers, so can generic > pdata for that too. Why can't the platform data be moved into the driver given that it appears to be only SoC family specific? Auxdata was somewhat intended to be temporary. It appears there is already some per compatible match data for these OMAP parts in the driver. Rob
[toc] | [next] | [standalone]
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Date | 2016-04-07 12:30 +0200 |
| Subject | Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup |
| Message-ID | <rlfmi-2le-23@gated-at.bofh.it> |
| In reply to | #1373068 |
On 04/07/2016 07:52 AM, Rob Herring wrote: > On Fri, Apr 1, 2016 at 4:40 PM, Tony Lindgren <tony@atomide.com> wrote: >> * Tony Lindgren <tony@atomide.com> [160401 14:37]: >>> We currently try to match of_dev_auxdata based on compatible, >>> IO address, and device name. But in some cases we have multiple >>> instances of drivers that can use the same auxdata. >>> >>> Let's add an additional secondary lookup for generic compatible >>> match for auxdata if no device specific match is found. This does >>> not change the existing matching, and still allows adding device >>> specific auxdata. >>> >>> This simplifies things as specifying the IO address and device >>> name is prone errors as it requires maintaining an in kernel >>> database for each SoC. >> >> And here's what I can apply later on to get rid of some >> ifdeffery. >> >> I'm also planning to move some of the legacy omap hwmod >> functionality into proper device drivers, so can generic >> pdata for that too. > > Why can't the platform data be moved into the driver given that it > appears to be only SoC family specific? Auxdata was somewhat intended > to be temporary. It appears there is already some per compatible match > data for these OMAP parts in the driver. > Most probably this is required to pass some data from parent device to children when parent dev instantiate children from DT, at least I've experimented with this in mostly similar way (I've not added second pass and did break in the first if !phys_addr, but Tony's patch is more correct). For example, - USB dwc3 platform/integration layer dev creates DWC3-core device (of_platform_populate()) - DWC3-core device creates xhci device - USB dwc3 platform/integration layer dev can dynamically get rev info from HW and identify limitation/erratas/quirks which need to be applied to to its children. - DWC3-core can dynamically get rev info ... I was not able to find any other proper way to pass this (platfrom)data to children, except using Auxdata. And, as per Felipe Balbi, It was the major reason why now DWC3-core device creates xhci device manually. -- regards, -grygorii
[toc] | [prev] | [next] | [standalone]
| From | Felipe Balbi <felipe.balbi@linux.intel.com> |
|---|---|
| Date | 2016-04-07 13:20 +0200 |
| Message-ID | <rlg8F-2Yy-3@gated-at.bofh.it> |
| In reply to | #1373251 |
[Multipart message — attachments visible in raw view] — view raw
Hi, Grygorii Strashko <grygorii.strashko@ti.com> writes: > On 04/07/2016 07:52 AM, Rob Herring wrote: >> On Fri, Apr 1, 2016 at 4:40 PM, Tony Lindgren <tony@atomide.com> wrote: >>> * Tony Lindgren <tony@atomide.com> [160401 14:37]: >>>> We currently try to match of_dev_auxdata based on compatible, >>>> IO address, and device name. But in some cases we have multiple >>>> instances of drivers that can use the same auxdata. >>>> >>>> Let's add an additional secondary lookup for generic compatible >>>> match for auxdata if no device specific match is found. This does >>>> not change the existing matching, and still allows adding device >>>> specific auxdata. >>>> >>>> This simplifies things as specifying the IO address and device >>>> name is prone errors as it requires maintaining an in kernel >>>> database for each SoC. >>> >>> And here's what I can apply later on to get rid of some >>> ifdeffery. >>> >>> I'm also planning to move some of the legacy omap hwmod >>> functionality into proper device drivers, so can generic >>> pdata for that too. >> >> Why can't the platform data be moved into the driver given that it >> appears to be only SoC family specific? Auxdata was somewhat intended >> to be temporary. It appears there is already some per compatible match >> data for these OMAP parts in the driver. >> > > Most probably this is required to pass some data from parent device to > children when parent dev instantiate children from DT, at least I've experimented with > this in mostly similar way (I've not added second pass and did break in the first > if !phys_addr, but Tony's patch is more correct). > > For example, > - USB dwc3 platform/integration layer dev creates DWC3-core device (of_platform_populate()) > - DWC3-core device creates xhci device > - USB dwc3 platform/integration layer dev can dynamically get rev info > from HW and identify limitation/erratas/quirks which need to be applied to > to its children. > - DWC3-core can dynamically get rev info ... > > I was not able to find any other proper way to pass this (platfrom)data to children, except > using Auxdata. And, as per Felipe Balbi, It was the major reason why now > DWC3-core device creates xhci device manually. doesn't device_property() solve that ? I'm just waiting for some patches from Heikki (in Cc) before we rip pdata from dwc3 completely. At that point, we can look at building xhci from DT. The only thing that comes to mind is how this will look for PCI-only systems if we rip manual xHCI device creation completely. -- balbi
[toc] | [prev] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2016-04-12 17:20 +0200 |
| Subject | Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup |
| Message-ID | <rn8gF-10N-13@gated-at.bofh.it> |
| In reply to | #1373278 |
* Felipe Balbi <felipe.balbi@linux.intel.com> [160407 04:19]: > Grygorii Strashko <grygorii.strashko@ti.com> writes: > > Most probably this is required to pass some data from parent device to > > children when parent dev instantiate children from DT, at least I've experimented with > > this in mostly similar way (I've not added second pass and did break in the first > > if !phys_addr, but Tony's patch is more correct). OK that's a different use case I have, but good to know it helps with that too. > > For example, > > - USB dwc3 platform/integration layer dev creates DWC3-core device (of_platform_populate()) > > - DWC3-core device creates xhci device > > - USB dwc3 platform/integration layer dev can dynamically get rev info > > from HW and identify limitation/erratas/quirks which need to be applied to > > to its children. > > - DWC3-core can dynamically get rev info ... > > > > I was not able to find any other proper way to pass this (platfrom)data to children, except > > using Auxdata. And, as per Felipe Balbi, It was the major reason why now > > DWC3-core device creates xhci device manually. > > doesn't device_property() solve that ? I'm just waiting for some patches > from Heikki (in Cc) before we rip pdata from dwc3 completely. At that > point, we can look at building xhci from DT. > > The only thing that comes to mind is how this will look for PCI-only > systems if we rip manual xHCI device creation completely. Sounds like this dwc3 thread is a bit separate from the $subject patch except for the legacy usage. Regards, Tony
[toc] | [prev] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2016-04-07 19:00 +0200 |
| Subject | Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup |
| Message-ID | <rllrJ-6RI-45@gated-at.bofh.it> |
| In reply to | #1373068 |
* Rob Herring <robh+dt@kernel.org> [160406 21:53]: > On Fri, Apr 1, 2016 at 4:40 PM, Tony Lindgren <tony@atomide.com> wrote: > > * Tony Lindgren <tony@atomide.com> [160401 14:37]: > >> We currently try to match of_dev_auxdata based on compatible, > >> IO address, and device name. But in some cases we have multiple > >> instances of drivers that can use the same auxdata. > >> > >> Let's add an additional secondary lookup for generic compatible > >> match for auxdata if no device specific match is found. This does > >> not change the existing matching, and still allows adding device > >> specific auxdata. > >> > >> This simplifies things as specifying the IO address and device > >> name is prone errors as it requires maintaining an in kernel > >> database for each SoC. > > > > And here's what I can apply later on to get rid of some > > ifdeffery. > > > > I'm also planning to move some of the legacy omap hwmod > > functionality into proper device drivers, so can generic > > pdata for that too. > > Why can't the platform data be moved into the driver given that it > appears to be only SoC family specific? Auxdata was somewhat intended > to be temporary. It appears there is already some per compatible match > data for these OMAP parts in the driver. There are just too many dependencies to move legacy code into drivers directly. Especially when moving the omap hwmod code into drivers, we still to use hwmod callbacks at least for clockdomain configuration, wake-up dependencies and clock autogating configuration. When we have Linux generic frameworks available for all this we no longer need the auxdata. But meanwhile, removing the depenencies by using auxdata already allows moving big chunks of the hwmod code into regular device drivers. Regards, Tony
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh+dt@kernel.org> |
|---|---|
| Date | 2016-04-12 18:00 +0200 |
| Message-ID | <rn8Tp-1ma-43@gated-at.bofh.it> |
| In reply to | #1373573 |
On Thu, Apr 7, 2016 at 11:58 AM, Tony Lindgren <tony@atomide.com> wrote: > * Rob Herring <robh+dt@kernel.org> [160406 21:53]: >> On Fri, Apr 1, 2016 at 4:40 PM, Tony Lindgren <tony@atomide.com> wrote: >> > * Tony Lindgren <tony@atomide.com> [160401 14:37]: >> >> We currently try to match of_dev_auxdata based on compatible, >> >> IO address, and device name. But in some cases we have multiple >> >> instances of drivers that can use the same auxdata. >> >> >> >> Let's add an additional secondary lookup for generic compatible >> >> match for auxdata if no device specific match is found. This does >> >> not change the existing matching, and still allows adding device >> >> specific auxdata. >> >> >> >> This simplifies things as specifying the IO address and device >> >> name is prone errors as it requires maintaining an in kernel >> >> database for each SoC. >> > >> > And here's what I can apply later on to get rid of some >> > ifdeffery. >> > >> > I'm also planning to move some of the legacy omap hwmod >> > functionality into proper device drivers, so can generic >> > pdata for that too. >> >> Why can't the platform data be moved into the driver given that it >> appears to be only SoC family specific? Auxdata was somewhat intended >> to be temporary. It appears there is already some per compatible match >> data for these OMAP parts in the driver. > > There are just too many dependencies to move legacy code into drivers > directly. Especially when moving the omap hwmod code into drivers, > we still to use hwmod callbacks at least for clockdomain configuration, > wake-up dependencies and clock autogating configuration. > > When we have Linux generic frameworks available for all this we no longer > need the auxdata. But meanwhile, removing the depenencies by using > auxdata already allows moving big chunks of the hwmod code into regular > device drivers. Okay. In that case: Acked-by: Rob Herring <robh@kernel.org> Apply it when you have actual users depending on it. Rob
[toc] | [prev] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2016-04-12 18:40 +0200 |
| Subject | Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup |
| Message-ID | <rn9w6-1Xf-9@gated-at.bofh.it> |
| In reply to | #1376980 |
* Rob Herring <robh+dt@kernel.org> [160412 08:57]: > On Thu, Apr 7, 2016 at 11:58 AM, Tony Lindgren <tony@atomide.com> wrote: > > * Rob Herring <robh+dt@kernel.org> [160406 21:53]: > >> On Fri, Apr 1, 2016 at 4:40 PM, Tony Lindgren <tony@atomide.com> wrote: > >> > * Tony Lindgren <tony@atomide.com> [160401 14:37]: > >> >> We currently try to match of_dev_auxdata based on compatible, > >> >> IO address, and device name. But in some cases we have multiple > >> >> instances of drivers that can use the same auxdata. > >> >> > >> >> Let's add an additional secondary lookup for generic compatible > >> >> match for auxdata if no device specific match is found. This does > >> >> not change the existing matching, and still allows adding device > >> >> specific auxdata. > >> >> > >> >> This simplifies things as specifying the IO address and device > >> >> name is prone errors as it requires maintaining an in kernel > >> >> database for each SoC. > >> > > >> > And here's what I can apply later on to get rid of some > >> > ifdeffery. > >> > > >> > I'm also planning to move some of the legacy omap hwmod > >> > functionality into proper device drivers, so can generic > >> > pdata for that too. > >> > >> Why can't the platform data be moved into the driver given that it > >> appears to be only SoC family specific? Auxdata was somewhat intended > >> to be temporary. It appears there is already some per compatible match > >> data for these OMAP parts in the driver. > > > > There are just too many dependencies to move legacy code into drivers > > directly. Especially when moving the omap hwmod code into drivers, > > we still to use hwmod callbacks at least for clockdomain configuration, > > wake-up dependencies and clock autogating configuration. > > > > When we have Linux generic frameworks available for all this we no longer > > need the auxdata. But meanwhile, removing the depenencies by using > > auxdata already allows moving big chunks of the hwmod code into regular > > device drivers. > > Okay. In that case: > > Acked-by: Rob Herring <robh@kernel.org> > > Apply it when you have actual users depending on it. OK thanks will do. Regards, Tony
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web