[U-Boot] [PATCH] pci: Support parsing PCI controller DT subnodes
Marek Vasut
marek.vasut at gmail.com
Mon Aug 20 20:15:33 UTC 2018
On 08/20/2018 09:29 PM, Simon Glass wrote:
[...]
>>>>> So what is the conclusion here ? Patch the design document and apply
>>>>> this patch as is ?
>>>>>
>>>>
>>>> I think we should see Simon's comments before we move forward. The
>>>> proposal I made before should come in a series, not just
>>>> documentation.
>>>
>>> This thread is too long :-)
>>>
>>> From what I understand, Marek and Bin are discussing whether a
>>> compatible string is needed to bind a driver.
>>>
>>> Generally it is. But with PCI and USB we have a search mechanism which
>>> can be used instead.
>>>
>>> The patch Marek submitted does not seems at all desirable to me.
>>
>> Can you explain why ?
>
> We already have a compatible string as the standard way to attach
> drivers to devices.
>
> For PCI, we already have PCI_DEVICE() and friends for when we can
> attach a driver for a PCI device without using a compatible string.
>
> Both of these are defined in the DT specification.
>
> The patch seems to be a rework of PCI_DEVICE() and I cannot why it is necessary.
This is explained in the patch description and the thread again. Please
read the thread before replying. Take a look at the r8a7794.dtsi and its
PCI bindings, there are PCI controller subnodes which add extra
information for PCI devices on the bus. These nodes do not have a
compatible string, only a BFD.
This is perfectly valid, since you can match a driver on the PCI IDs or
classes (PCI_DEVICE()), but the driver doesn't have a DT node associated
with it. If there is a DT node with a matching BFD, it is associated
with the driver instance by this patch.
This allows ie. the EHCI PCI driver to access that DT node and extract
information about PHYs from the DT (in case of the r8a7794).
[...]
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list