diff options
author | Cédric Le Goater <clg@kaod.org> | 2021-01-26 18:10:56 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-02-10 10:43:50 +1100 |
commit | 60ef80101e3764f40a6b96c67b407a44e0b9330d (patch) | |
tree | 7defa652daa676edf5f72662842686bee4eb7800 /hw | |
parent | 05ce9b73b877d4a91f722e4a359315d7c9e1adc9 (diff) | |
download | qemu-60ef80101e3764f40a6b96c67b407a44e0b9330d.zip qemu-60ef80101e3764f40a6b96c67b407a44e0b9330d.tar.gz qemu-60ef80101e3764f40a6b96c67b407a44e0b9330d.tar.bz2 |
ppc/pnv: Simplify pnv_bmc_create()
and reuse pnv_bmc_set_pnor() to share the setting of the PNOR.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20210126171059.307867-5-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/pnv_bmc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c index 67ebb16..86d16b4 100644 --- a/hw/ppc/pnv_bmc.c +++ b/hw/ppc/pnv_bmc.c @@ -260,13 +260,8 @@ IPMIBmc *pnv_bmc_create(PnvPnor *pnor) Object *obj; obj = object_new(TYPE_IPMI_BMC_SIMULATOR); - object_ref(OBJECT(pnor)); - object_property_add_const_link(obj, "pnor", OBJECT(pnor)); qdev_realize(DEVICE(obj), NULL, &error_fatal); - - /* Install the HIOMAP protocol handlers to access the PNOR */ - ipmi_sim_register_netfn(IPMI_BMC_SIMULATOR(obj), IPMI_NETFN_OEM, - &hiomap_netfn); + pnv_bmc_set_pnor(IPMI_BMC(obj), pnor); return IPMI_BMC(obj); } |