qemu/include/hw/pci-host
David Gibson 466e883185 spapr: Clean up dt creation for PCI buses
Device nodes for PCI bridges (both host and P2P) describe both the bridge
device itself and the bus hanging off it, handling of this is a bit of a
mess.

spapr_dt_pci_device() has a few things it only adds for non-bridges, but
always adds #address-cells and #size-cells which should only appear for
bridges.  But the walking down the subordinate PCI bus is done in one of
its callers spapr_populate_pci_devices_dt().  The PHB dt creation in
spapr_populate_pci_dt() open codes some similar logic to the bridge case.

This patch consolidates things in a bunch of ways:
 * Bus specific dt info is now created in spapr_dt_pci_bus() used for both
   P2P bridges and the host bridge.  This includes walking subordinate
   devices
 * spapr_dt_pci_device() now calls spapr_dt_pci_bus() when called on a
   P2P bridge
 * We do detection of bridges with the is_bridge field of the device class,
   rather than checking PCI config space directly, for consistency with
   qemu's core PCI code.
 * Several things are renamed for brevity and clarity

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
2019-06-12 10:41:49 +10:00
..
designware.h Clean up decorations and whitespace around header guards 2019-05-13 08:58:55 +02:00
gpex.h Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
pam.h
ppce500.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
q35.h Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
sabre.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
spapr.h spapr: Clean up dt creation for PCI buses 2019-06-12 10:41:49 +10:00
uninorth.h uninorth: add ofw-addr property to allow correct fw path generation 2018-08-30 10:42:18 +10:00
xilinx-pcie.h pci: Move bridge data structures from pci_bus.h to pci_bridge.h 2017-12-05 19:13:45 +02:00