From: Rob Herring <robh@kernel.org>
To: "Clément Léger" <clement.leger@bootlin.com>
Cc: Lizhi Hou <lizhi.hou@xilinx.com>,
Sonal Santan <sonal.santan@xilinx.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Frank Rowand <frowand.list@gmail.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
Steen Hegelund <Steen.Hegelund@microchip.com>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Allan Nielsen <allan.nielsen@microchip.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
devicetree@vger.kernel.org,
Stefano Stabellini <sstabellini@kernel.org>,
Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH v2 0/3] add fwnode support to reset subsystem
Date: Wed, 6 Apr 2022 08:04:35 -0500 [thread overview]
Message-ID: <Yk2P4zgKP8dVYUWm@robh.at.kernel.org> (raw)
In-Reply-To: <20220406095213.21cf3ffb@fixe.home>
On Wed, Apr 06, 2022 at 09:52:13AM +0200, Clément Léger wrote:
> 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.
As I said before, the driver could create its node and all the parents.
I went with the other option partly because I didn't have a particular
driver. That has the advantage of only creating necessary nodes and
provides a way to trigger doing so. The issue with it is the timing of
when the node gets set (after parent devices have probed).
> 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().
The host bridge resource list should have all the information needed.
Rob
next prev parent reply other threads:[~2022-04-06 15:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 14:12 [PATCH v2 0/3] add fwnode support to reset subsystem Clément Léger
2022-03-24 14:12 ` [PATCH v2 1/3] of: add function to convert fwnode_reference_args to of_phandle_args Clément Léger
2022-03-24 14:12 ` [PATCH v2 2/3] reset: add support for fwnode Clément Léger
2022-03-24 14:12 ` [PATCH v2 3/3] reset: mchp: sparx5: set fwnode field of reset controller Clément Léger
2022-04-04 17:41 ` [PATCH v2 0/3] add fwnode support to reset subsystem Rob Herring
2022-04-05 7:24 ` Clément Léger
2022-04-05 14:47 ` Rob Herring
2022-04-05 15:51 ` Clément Léger
2022-04-05 17:11 ` Rob Herring
2022-04-05 21:28 ` Rob Herring
2022-04-06 7:52 ` Clément Léger
2022-04-06 13:04 ` Rob Herring [this message]
2022-04-06 7:40 ` Clément Léger
2022-04-06 13:19 ` Rob Herring
2022-04-06 13:33 ` Alexandre Belloni
2022-04-06 13:36 ` Clément Léger
2022-04-08 15:48 ` Clément Léger
2022-04-25 10:21 ` Philipp Zabel
2022-04-25 11:18 ` Clément Léger
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=Yk2P4zgKP8dVYUWm@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=clement.leger@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=hdegoede@redhat.com \
--cc=lars.povlsen@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@xilinx.com \
--cc=p.zabel@pengutronix.de \
--cc=sonal.santan@xilinx.com \
--cc=sstabellini@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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).