Revision | ba49190107ee9803fb2f336b15283b457384b178 (tree) |
---|---|
Time | 2022-01-18 20:56:31 |
Author | Cédric Le Goater <clg@kaod...> |
Commiter | Cédric Le Goater |
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>
@@ -672,7 +672,7 @@ static uint64_t pnv_phb4_reg_read(void *opaque, hwaddr off, unsigned size) | ||
672 | 672 | |
673 | 673 | switch (off) { |
674 | 674 | case PHB_VERSION: |
675 | - return phb->version; | |
675 | + return PNV_PHB4_PEC_GET_CLASS(phb->pec)->version; | |
676 | 676 | |
677 | 677 | /* Read-only */ |
678 | 678 | case PHB_PHB4_GEN_CAP: |
@@ -1575,7 +1575,6 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp) | ||
1575 | 1575 | if (!phb->pec) { |
1576 | 1576 | PnvMachineState *pnv = PNV_MACHINE(qdev_get_machine()); |
1577 | 1577 | PnvChip *chip = pnv_get_chip(pnv, phb->chip_id); |
1578 | - PnvPhb4PecClass *pecc; | |
1579 | 1578 | BusState *s; |
1580 | 1579 | |
1581 | 1580 | if (!chip) { |
@@ -1589,11 +1588,6 @@ static void pnv_phb4_realize(DeviceState *dev, Error **errp) | ||
1589 | 1588 | return; |
1590 | 1589 | } |
1591 | 1590 | |
1592 | - /* All other phb properties are already set */ | |
1593 | - pecc = PNV_PHB4_PEC_GET_CLASS(phb->pec); | |
1594 | - object_property_set_int(OBJECT(phb), "version", pecc->version, | |
1595 | - &error_fatal); | |
1596 | - | |
1597 | 1591 | /* |
1598 | 1592 | * Reparent user created devices to the chip to build |
1599 | 1593 | * correctly the device tree. |
@@ -1688,7 +1682,6 @@ static void pnv_phb4_xive_notify(XiveNotifier *xf, uint32_t srcno) | ||
1688 | 1682 | static Property pnv_phb4_properties[] = { |
1689 | 1683 | DEFINE_PROP_UINT32("index", PnvPHB4, phb_id, 0), |
1690 | 1684 | DEFINE_PROP_UINT32("chip-id", PnvPHB4, chip_id, 0), |
1691 | - DEFINE_PROP_UINT64("version", PnvPHB4, version, 0), | |
1692 | 1685 | DEFINE_PROP_LINK("pec", PnvPHB4, pec, TYPE_PNV_PHB4_PEC, |
1693 | 1686 | PnvPhb4PecState *), |
1694 | 1687 | DEFINE_PROP_END_OF_LIST(), |
@@ -117,7 +117,6 @@ static void pnv_pec_default_phb_realize(PnvPhb4PecState *pec, | ||
117 | 117 | Error **errp) |
118 | 118 | { |
119 | 119 | PnvPHB4 *phb = PNV_PHB4(qdev_new(TYPE_PNV_PHB4)); |
120 | - PnvPhb4PecClass *pecc = PNV_PHB4_PEC_GET_CLASS(pec); | |
121 | 120 | int phb_id = pnv_phb4_pec_get_phb_id(pec, stack_no); |
122 | 121 | |
123 | 122 | object_property_set_link(OBJECT(phb), "pec", OBJECT(pec), |
@@ -126,8 +125,6 @@ static void pnv_pec_default_phb_realize(PnvPhb4PecState *pec, | ||
126 | 125 | &error_fatal); |
127 | 126 | object_property_set_int(OBJECT(phb), "index", phb_id, |
128 | 127 | &error_fatal); |
129 | - object_property_set_int(OBJECT(phb), "version", pecc->version, | |
130 | - &error_fatal); | |
131 | 128 | |
132 | 129 | if (!sysbus_realize(SYS_BUS_DEVICE(phb), errp)) { |
133 | 130 | return; |