devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Herve Codina <herve.codina@bootlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Lizhi Hou <lizhi.hou@amd.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pci@vger.kernel.org,
	Allan Nielsen <allan.nielsen@microchip.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>,
	Steen Hegelund <steen.hegelund@microchip.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 0/6] Add support for the root PCI bus device-tree node creation.
Date: Mon, 4 Nov 2024 14:15:07 -0600	[thread overview]
Message-ID: <20241104201507.GA361448-robh@kernel.org> (raw)
In-Reply-To: <20241104172001.165640-1-herve.codina@bootlin.com>

On Mon, Nov 04, 2024 at 06:19:54PM +0100, Herve Codina wrote:
> Hi,
> 
> This series adds support for creating a device-tree node for a root PCI
> bus on non device-tree based system.
> 
> Creating device-tree nodes for PCI devices already exists upstream. It
> was added in commit 407d1a51921e ("PCI: Create device tree node for
> bridge"). Created device-tree nodes need a parent node to be attached
> to. For the first level devices, on device-tree based system, this
> parent node (i.e. the root PCI bus) is described in the base device-tree
> (PCI controller).
> 
> The LAN966x PCI device driver was recently accepted [1] and relies on
> this feature.
> 
> On system where the base hardware is not described by a device-tree, the
> root PCI bus node to which first level created PCI devices need to be
> attach to does not exist. This is the case for instance on ACPI
> described systems such as x86.
> 
> This series goal is to handle this case.
> 
> In order to have the root PCI bus device-tree node available even on
> x86, this top level node is created (if not already present) based on
> information computed by the PCI core. It follows the same mechanism as
> the one used for PCI devices device-tree node creation.
> 
> In order to have this feature available, a number of changes are needed:
>   - Patch 1 and 2: Introduce and use device_{add,remove}_of_node().
>     This function will also be used in the root PCI bus node creation.
> 
>   - Patch 3 and 4: Improve existing functions to reuse them in the root
>     PCI bus node creation.
> 
>   - Patch 5: Update the default value used when #address-cells is not
>     available in the device-tree root node.
> 
>   - Patch 6: The root PCI bus device-tree node creation itself.
> 
> With those modifications, the LAN966x PCI device is working on x86 systems.

That's nice, but I don't have a LAN966x device nor do I want one. We 
already have the QEMU PCI test device working with the existing PCI 
support. Please ensure this series works with it as well.

Rob

  parent reply	other threads:[~2024-11-04 20:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04 17:19 [PATCH 0/6] Add support for the root PCI bus device-tree node creation Herve Codina
2024-11-04 17:19 ` [PATCH 1/6] driver core: Introduce device_{add,remove}_of_node() Herve Codina
2024-11-04 17:19 ` [PATCH 2/6] PCI: of: Use device_{add,remove}_of_node() to attach of_node to existing device Herve Codina
2024-11-04 20:20   ` Rob Herring
2024-11-05 16:16     ` Herve Codina
2024-11-04 17:19 ` [PATCH 3/6] PCI: of_property: Add support for NULL pdev in of_pci_set_address() Herve Codina
2024-11-04 17:19 ` [PATCH 4/6] PCI: of_property: Constify parameter in of_pci_get_addr_flags() Herve Codina
2024-11-04 17:19 ` [PATCH 5/6] of: Use the standards compliant default address cells value for x86 Herve Codina
2024-11-04 20:07   ` Rob Herring
2024-11-05 16:35     ` Herve Codina
2024-11-04 17:20 ` [PATCH 6/6] PCI: of: Create device-tree root bus node Herve Codina
2024-11-05 18:59   ` Bjorn Helgaas
2024-11-06 14:53     ` Herve Codina
2024-11-06 16:47       ` Bjorn Helgaas
2024-11-04 20:15 ` Rob Herring [this message]
2024-11-05 17:44   ` [PATCH 0/6] Add support for the root PCI bus device-tree node creation Herve Codina
2024-11-05 19:59     ` Rob Herring
2024-11-06 13:33       ` Herve Codina

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=20241104201507.GA361448-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=allan.nielsen@microchip.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=herve.codina@bootlin.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=steen.hegelund@microchip.com \
    --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).