[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 095/101] ppc/pnv: Introduce version and device_id class atributes
From: |
Cédric Le Goater |
Subject: |
[PULL 095/101] ppc/pnv: Introduce version and device_id class atributes for PHB4 devices |
Date: |
Thu, 16 Dec 2021 21:26:08 +0100 |
It prepares ground for PHB5 which has different values.
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211213132830.108372-9-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
include/hw/pci-host/pnv_phb4.h | 2 ++
hw/pci-host/pnv_phb4_pec.c | 2 ++
hw/ppc/pnv.c | 4 ++--
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
index 27556ae53425..b2864233641e 100644
--- a/include/hw/pci-host/pnv_phb4.h
+++ b/include/hw/pci-host/pnv_phb4.h
@@ -219,6 +219,8 @@ struct PnvPhb4PecClass {
int compat_size;
const char *stk_compat;
int stk_compat_size;
+ uint64_t version;
+ uint64_t device_id;
};
#endif /* PCI_HOST_PNV_PHB4_H */
diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c
index 741ddc90ed8d..9f722729ac50 100644
--- a/hw/pci-host/pnv_phb4_pec.c
+++ b/hw/pci-host/pnv_phb4_pec.c
@@ -499,6 +499,8 @@ static void pnv_pec_class_init(ObjectClass *klass, void
*data)
pecc->compat_size = sizeof(compat);
pecc->stk_compat = stk_compat;
pecc->stk_compat_size = sizeof(stk_compat);
+ pecc->version = PNV_PHB4_VERSION;
+ pecc->device_id = PNV_PHB4_DEVICE_ID;
}
static const TypeInfo pnv_pec_type_info = {
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 2fc2b0dff7a3..78436a30ac0e 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1421,9 +1421,9 @@ static void pnv_chip_power9_phb_realize(PnvChip *chip,
Error **errp)
object_property_set_int(obj, "index", phb_id, &error_fatal);
object_property_set_int(obj, "chip-id", chip->chip_id,
&error_fatal);
- object_property_set_int(obj, "version", PNV_PHB4_VERSION,
+ object_property_set_int(obj, "version", pecc->version,
&error_fatal);
- object_property_set_int(obj, "device-id", PNV_PHB4_DEVICE_ID,
+ object_property_set_int(obj, "device-id", pecc->device_id,
&error_fatal);
object_property_set_link(obj, "stack", OBJECT(stack),
&error_abort);
--
2.31.1
- [PULL 066/101] ppc/ppc405: Change ppc405ep_init() return value, (continued)
- [PULL 066/101] ppc/ppc405: Change ppc405ep_init() return value, Cédric Le Goater, 2021/12/16
- [PULL 067/101] ppc/ppc405: Add some address space definitions, Cédric Le Goater, 2021/12/16
- [PULL 088/101] PPC64/TCG: Implement 'rfebb' instruction, Cédric Le Goater, 2021/12/16
- [PULL 085/101] target/ppc: enable PMU counter overflow with cycle events, Cédric Le Goater, 2021/12/16
- [PULL 057/101] target/ppc: Fix MPCxxx FPU interrupt address, Cédric Le Goater, 2021/12/16
- [PULL 086/101] target/ppc: enable PMU instruction count, Cédric Le Goater, 2021/12/16
- [PULL 097/101] ppc/pnv: Introduce a num_stack class attribute, Cédric Le Goater, 2021/12/16
- [PULL 098/101] ppc/pnv: Compute the PHB index from the PHB4 PEC model, Cédric Le Goater, 2021/12/16
- [PULL 100/101] ppc/pnv: Move realize of PEC stacks under the PEC model, Cédric Le Goater, 2021/12/16
- [PULL 099/101] ppc/pnv: Remove "system-memory" property from PHB4 PEC, Cédric Le Goater, 2021/12/16
- [PULL 095/101] ppc/pnv: Introduce version and device_id class atributes for PHB4 devices,
Cédric Le Goater <=
- [PULL 093/101] ppc/pnv: Use QOM hierarchy to scan PHB3 devices, Cédric Le Goater, 2021/12/16
- [PULL 090/101] ppc/pnv: Use the chip class to check the index of PHB3 devices, Cédric Le Goater, 2021/12/16
- [PULL 101/101] ppc/pnv: Use QOM hierarchy to scan PEC PHB4 devices, Cédric Le Goater, 2021/12/16
- [PULL 084/101] target/ppc: PMU: update counters on MMCR1 write, Cédric Le Goater, 2021/12/16
- [PULL 089/101] ppc/pnv: Introduce a "chip" property under PHB3, Cédric Le Goater, 2021/12/16
- [PULL 094/101] ppc/pnv: Introduce a num_pecs class attribute for PHB4 PEC devices, Cédric Le Goater, 2021/12/16
- [PULL 079/101] target/ppc: Fix e6500 boot, Cédric Le Goater, 2021/12/16
- Re: [PULL v2 000/101] ppc queue, Richard Henderson, 2021/12/17