All the complexity that was scattered between PnvPhb4PecStack and PnvPHB4 are now centered in the PnvPHB4 device. PnvPhb4PecStack does not serve any purpose in the current code base.
Reviewed-by: Cédric Le Goater <c...@kaod.org> Signed-off-by: Daniel Henrique Barboza <danielhb...@gmail.com> --- hw/pci-host/pnv_phb4_pec.c | 33 --------------------------------- include/hw/pci-host/pnv_phb4.h | 17 ----------------- 2 files changed, 50 deletions(-) diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c index 852816b9f8..12aa459628 100644 --- a/hw/pci-host/pnv_phb4_pec.c +++ b/hw/pci-host/pnv_phb4_pec.c @@ -278,42 +278,9 @@ static const TypeInfo pnv_pec_type_info = { } }; -static void pnv_pec_stk_realize(DeviceState *dev, Error **errp) -{ -} - -static Property pnv_pec_stk_properties[] = { - DEFINE_PROP_LINK("pec", PnvPhb4PecStack, pec, TYPE_PNV_PHB4_PEC, - PnvPhb4PecState *), - DEFINE_PROP_END_OF_LIST(), -}; - -static void pnv_pec_stk_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc = DEVICE_CLASS(klass); - - device_class_set_props(dc, pnv_pec_stk_properties); - dc->realize = pnv_pec_stk_realize; - dc->user_creatable = false; - - /* TODO: reset regs ? */ -} - -static const TypeInfo pnv_pec_stk_type_info = { - .name = TYPE_PNV_PHB4_PEC_STACK, - .parent = TYPE_DEVICE, - .instance_size = sizeof(PnvPhb4PecStack), - .class_init = pnv_pec_stk_class_init, - .interfaces = (InterfaceInfo[]) { - { TYPE_PNV_XSCOM_INTERFACE }, - { } - } -}; - static void pnv_pec_register_types(void) { type_register_static(&pnv_pec_type_info); - type_register_static(&pnv_pec_stk_type_info); } type_init(pnv_pec_register_types); diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h index e750165e77..74fdec2b47 100644 --- a/include/hw/pci-host/pnv_phb4.h +++ b/include/hw/pci-host/pnv_phb4.h @@ -164,23 +164,6 @@ extern const MemoryRegionOps pnv_phb4_xscom_ops; #define TYPE_PNV_PHB4_PEC "pnv-phb4-pec" OBJECT_DECLARE_TYPE(PnvPhb4PecState, PnvPhb4PecClass, PNV_PHB4_PEC) -#define TYPE_PNV_PHB4_PEC_STACK "pnv-phb4-pec-stack" -OBJECT_DECLARE_SIMPLE_TYPE(PnvPhb4PecStack, PNV_PHB4_PEC_STACK) - -/* Per-stack data */ -struct PnvPhb4PecStack { - DeviceState parent; - - /* The owner PEC */ - PnvPhb4PecState *pec; - - /* - * PHB4 pointer. pnv_phb4_update_regions() needs to access - * the PHB4 via a PnvPhb4PecStack pointer. - */ - PnvPHB4 *phb; -}; - struct PnvPhb4PecState { DeviceState parent; -- 2.33.1