ppc/pnv: turn PnvPHB4 into a PnvPHB backend
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 24 Jun 2022 08:49:14 +0000 (05:49 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 31 Aug 2022 17:08:05 +0000 (14:08 -0300)
commit210aacb3b92707ecc5de811c743322ca395c0fa6
tree646006642e4d40b1ba97caa1660191ecb66bf08f
parentfe5bfd4bb816faa1b3fa8c3c23165cdbadfa5c91
ppc/pnv: turn PnvPHB4 into a PnvPHB backend

Change the parent type of the PnvPHB4 device to TYPE_PARENT since the
PCI bus is going to be initialized by the PnvPHB parent. Functions that
needs to access the bus via a PnvPHB4 object can do so via the
phb4->phb_base pointer.

pnv_phb4_pec now creates a PnvPHB object.

The powernv9 machine class will create PnvPHB devices with version '4'.
powernv10 will create using version '5'. Both are using global machine
properties in their class_init() to do that.

These changes will benefit us when adding PnvPHB user creatable devices
for powernv9 and powernv10.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-Id: <20220624084921.399219-6-danielhb413@gmail.com>
hw/pci-host/pnv_phb4.c
hw/pci-host/pnv_phb4_pec.c
hw/ppc/pnv.c
include/hw/pci-host/pnv_phb4.h