mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] PCI: populate PCI host controller device nodes
@ 2026-05-21  8:36 Sascha Hauer
  2026-05-21  8:36 ` [PATCH 1/4] of: fall back to parent-prefixed encoding when address translation fails Sascha Hauer
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sascha Hauer @ 2026-05-21  8:36 UTC (permalink / raw)
  To: BAREBOX

PCI devices usually don't have and don't need a representation in the
device tree, but sometimes they do. This series adds support for adding
device nodes for PCI devices to the barebox live tree similar to what
Linux does with CONFIG_PCI_DYNAMIC_OF_NODES enabled. We also fixup the
Linux device tree with the PCI device nodes. This allows PCI device
drivers to register of_fixups for PCI devices: The barebox internal
PCI device now gets a device node (from the patched barebox live tree)
and it can use this node to find the corresponding device node in the
Linux device tree (possibly added by barebox as well).

In my case I do not need a PCI device driver to add a node to the
Linux tree. What I want to archieve is that a MAC address of a PCI
device that is initialized in a board specific way is forwarded to
Linux using the mac-address property. For this case there are is no
further code needed, the only piece missing is the creation of the
PCI device nodes added with this series.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Sascha Hauer (4):
      of: fall back to parent-prefixed encoding when address translation fails
      pci: fix DT node matching when reg encodes a non-zero bus number
      pci: add pci_is_bridge() helper
      pci: synthesize devicetree nodes for enumerated devices

 drivers/of/base.c        |   9 ++-
 drivers/pci/Kconfig      |  23 +++++++
 drivers/pci/Makefile     |   1 +
 drivers/pci/of-dynamic.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/pci/pci.c        |  12 +++-
 include/linux/pci.h      |  14 ++++
 include/of_pci.h         |   6 ++
 7 files changed, 235 insertions(+), 3 deletions(-)
---
base-commit: 6bde1c5bcd518f378189c2f4b41704126713f3c4
change-id: 20260521-pci-of-dynamic-15df50ff7905

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-21 20:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-21  8:36 [PATCH 0/4] PCI: populate PCI host controller device nodes Sascha Hauer
2026-05-21  8:36 ` [PATCH 1/4] of: fall back to parent-prefixed encoding when address translation fails Sascha Hauer
2026-05-21  8:36 ` [PATCH 2/4] pci: fix DT node matching when reg encodes a non-zero bus number Sascha Hauer
2026-05-21  8:36 ` [PATCH 3/4] pci: add pci_is_bridge() helper Sascha Hauer
2026-05-21 16:23   ` Bjorn Helgaas
2026-05-21 19:46     ` Sascha Hauer
2026-05-21 20:53       ` Bjorn Helgaas
2026-05-21  8:36 ` [PATCH 4/4] pci: synthesize devicetree nodes for enumerated devices Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox