lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 0/3] add fwnode support to reset subsystem
Le Tue, 5 Apr 2022 16:28:02 -0500,
Rob Herring <robh@kernel.org> a écrit :


> >
> > No, the kernel already maintains its own tree of devices. You just
> > need to use that to generate the tree. That's really not much more
> > than nodes with a 'reg' property encoding the device and function
> > numbers.
> >
> > We already support matching a PCI device to a DT node. The PCI
> > subsystem checks if there is a corresponding DT node for each PCI
> > device created and sets the of_node pointer if there is. For
> > OpenFirmware systems (PPC), there always is a node. For FDT, we
> > generally don't have a node unless there are additional
> > non-discoverable properties. Hikey960 is an example with PCI device
> > nodes in the DT as it has a soldered down PCIe switch with downstream
> > devices and non-discoverable properties (e.g. reset GPIO for each
> > port).
>
> Here's a quick and dirty implementation creating DT nodes for PCI devices:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git dt/pop-pci-nodes

Ok, thanks, after looking at the branch, it appears that you expect the
PCI nodes matching the probed PCI devices should be created by the PCI
subsystem itself. My previous comment saying that the node would be
created by the PCI driver itself is then wrong and I understand what
you meant.

Then, there is still a bit of magic to do to correctly fill the ranges
for translation and then the driver "simply" have to load the dtbo and
apply it with of_overlay_fdt_apply().

>
> Rob



--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com

\
 
 \ /
  Last update: 2022-09-17 16:20    [W:0.123 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site