e4e6db5283
The PnvPHB device is going to be the base device for all other powernv PHBs. It consists of a device that has the same user API as the other PHB, namely being a PCIHostBridge and having chip-id and index properties. It also has a 'backend' pointer that will be initialized with the PHB implementation that the device is going to use. The initialization of the PHB backend is done by checking the PHB version via a 'version' attribute that can be set via a global machine property. The 'version' field will be used to make adjustments based on the running version, e.g. PHB3 uses a 'chip' reference while PHB4 uses 'pec'. To init the PnvPHB bus we'll rely on helpers for each version. The version 3 helper is already added (pnv_phb3_bus_init), the PHB4 helper will be added later on. For now let's add the basic logic of the PnvPHB object, which consists mostly of pnv_phb_realize() doing all the work of checking the phb->version set, initializing the proper backend, passing through its attributes to the chosen backend, finalizing the backend realize and adding a root port in the end. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> Message-Id: <20220624084921.399219-3-danielhb413@gmail.com> |
||
---|---|---|
.. | ||
bonito.c | ||
designware.c | ||
dino.c | ||
gpex-acpi.c | ||
gpex.c | ||
grackle.c | ||
i440fx.c | ||
Kconfig | ||
meson.build | ||
mv643xx.h | ||
mv64361.c | ||
pam.c | ||
pnv_phb3_msi.c | ||
pnv_phb3_pbcq.c | ||
pnv_phb3.c | ||
pnv_phb4_pec.c | ||
pnv_phb4.c | ||
pnv_phb.c | ||
pnv_phb.h | ||
ppce500.c | ||
q35.c | ||
raven.c | ||
remote.c | ||
sabre.c | ||
sh_pci.c | ||
trace-events | ||
trace.h | ||
uninorth.c | ||
versatile.c | ||
xen_igd_pt.c | ||
xilinx-pcie.c |