aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host/pnv_phb4.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2022-01-18 12:56:31 +0100
committerCédric Le Goater <clg@kaod.org>2022-01-18 12:56:31 +0100
commitba49190107ee9803fb2f336b15283b457384b178 (patch)
treefd047c63c4a3cdfed1ed624e4f41230236838f68 /hw/pci-host/pnv_phb4.c
parent32a07887be0e4c51ae33e3efaf3368e916ca9af7 (diff)
downloadqemu-ba49190107ee9803fb2f336b15283b457384b178.zip
qemu-ba49190107ee9803fb2f336b15283b457384b178.tar.gz
qemu-ba49190107ee9803fb2f336b15283b457384b178.tar.bz2
ppc/pnv: Remove PHB4 version property
Grab the PHB version from the PEC class directly when needed. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220117122753.1655504-4-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/pci-host/pnv_phb4.c')
-rw-r--r--hw/pci-host/pnv_phb4.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index c688976..a78add7 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -672,7 +672,7 @@ static uint64_t pnv_phb4_reg_read(void *opaque, hwaddr off, unsigned size)
switch (off) {
case PHB_VERSION:
- return phb->version;
+ return PNV_PHB4_PEC_GET_CLASS(phb->pec)->version;
/* Read-only */
case PHB_PHB4_GEN_CAP:
@@ -1575,7 +1575,6 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp)
if (!phb->pec) {
PnvMachineState *pnv = PNV_MACHINE(qdev_get_machine());
PnvChip *chip = pnv_get_chip(pnv, phb->chip_id);
- PnvPhb4PecClass *pecc;
BusState *s;
if (!chip) {
@@ -1589,11 +1588,6 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp)
return;
}
- /* All other phb properties are already set */
- pecc = PNV_PHB4_PEC_GET_CLASS(phb->pec);
- object_property_set_int(OBJECT(phb), "version", pecc->version,
- &error_fatal);
-
/*
* Reparent user created devices to the chip to build
* correctly the device tree.
@@ -1688,7 +1682,6 @@ static void pnv_phb4_xive_notify(XiveNotifier *xf, uint32_t srcno)
static Property pnv_phb4_properties[] = {
DEFINE_PROP_UINT32("index", PnvPHB4, phb_id, 0),
DEFINE_PROP_UINT32("chip-id", PnvPHB4, chip_id, 0),
- DEFINE_PROP_UINT64("version", PnvPHB4, version, 0),
DEFINE_PROP_LINK("pec", PnvPHB4, pec, TYPE_PNV_PHB4_PEC,
PnvPhb4PecState *),
DEFINE_PROP_END_OF_LIST(),