lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 07 Apr 2016 14:15:56 +0300
From:	Felipe Balbi <felipe.balbi@...ux.intel.com>
To:	Grygorii Strashko <grygorii.strashko@...com>,
	Rob Herring <robh+dt@...nel.org>,
	Tony Lindgren <tony@...mide.com>
Cc:	Frank Rowand <frowand.list@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	"devicetree\@vger.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-omap <linux-omap@...r.kernel.org>
Subject: Re: [PATCH] of/platform: Allow secondary compatible match in of_dev_lookup


Hi,

Grygorii Strashko <grygorii.strashko@...com> writes:
> On 04/07/2016 07:52 AM, Rob Herring wrote:
>> On Fri, Apr 1, 2016 at 4:40 PM, Tony Lindgren <tony@...mide.com> wrote:
>>> * Tony Lindgren <tony@...mide.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

Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ