[RFC/PATCH] Set up PCI tree from OF on ppc64
Paul Mackerras
paulus at samba.org
Fri Aug 26 09:14:39 EST 2005
John Rose writes:
> Would we not want to use PROBE_DEVTREE for non-partitioned and legacy
> pSeries?
We could, once we've tested that it all works as expected on POWER3
and RS64 systems. I was just being a bit conservative.
> +static void __devinit of_scan_bus(struct device_node *node,
> + struct pci_bus *bus)
> ...
> +static void __devinit of_scan_pci_bridge(struct device_node *node,
> + struct pci_dev *dev)
>
> We should probably expose these for use by the PCI Hotplug/DLPAR
> drivers, along w/ scan_phb().
Sure. I was thinking as I was writing this code that we should use it
for hotplug as well.
> Could pci_process_bridge_OF_ranges() and of_scan_pci_bridge() use
> common "ranges" parsing logic? We're parsing the same property
> in two different ways in the same file. This could be a "todo" I
> guess.
Yes, probably. The size of each entry in the ranges property depends
on #address-cells for the parent, #address-cells for the child, and
#size-cells for the child. Currently we have those values hard-coded
to 3, 3, and 2 for of_scan_pci_bridge (which is OK because those
values are mandated by the PCI binding to OF), and 2, 3, 2 in
pci_process_bridge_OF_ranges. That's the main difference between
them.
Paul.
More information about the Linuxppc64-dev
mailing list