diff options
Diffstat (limited to 'hw/arm')
40 files changed, 56 insertions, 71 deletions
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c index e05099c..52e0d83 100644 --- a/hw/arm/allwinner-a10.c +++ b/hw/arm/allwinner-a10.c @@ -74,7 +74,7 @@ static void aw_a10_realize(DeviceState *dev, Error **errp) SysBusDevice *sysbusdev; Error *err = NULL; - object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err); + qdev_realize(DEVICE(&s->cpu), NULL, &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c index 91d2264..8e09468e 100644 --- a/hw/arm/allwinner-h3.c +++ b/hw/arm/allwinner-h3.c @@ -250,7 +250,7 @@ static void allwinner_h3_realize(DeviceState *dev, Error **errp) qdev_prop_set_bit(DEVICE(&s->cpus[i]), "has_el2", true); /* Mark realized */ - qdev_init_nofail(DEVICE(&s->cpus[i])); + qdev_realize(DEVICE(&s->cpus[i]), NULL, &error_fatal); } /* Generic Interrupt Controller */ diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 8abe130..9ddde33 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -584,8 +584,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) * CPU must exist and have been parented into the cluster before * the cluster is realized. */ - object_property_set_bool(OBJECT(&s->cluster[i]), - true, "realized", &err); + qdev_realize(DEVICE(&s->cluster[i]), NULL, &err); if (err) { error_propagate(errp, err); return; @@ -621,7 +620,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_bool(splitter, true, "realized", &err); + qdev_realize(DEVICE(splitter), NULL, &err); if (err) { error_propagate(errp, err); return; @@ -677,8 +676,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_bool(OBJECT(&s->sec_resp_splitter), true, - "realized", &err); + qdev_realize(DEVICE(&s->sec_resp_splitter), NULL, &err); if (err) { error_propagate(errp, err); return; @@ -729,8 +727,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_bool(OBJECT(&s->mpc_irq_orgate), true, - "realized", &err); + qdev_realize(DEVICE(&s->mpc_irq_orgate), NULL, &err); if (err) { error_propagate(errp, err); return; @@ -889,8 +886,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_bool(OBJECT(&s->ppc_irq_orgate), true, - "realized", &err); + qdev_realize(DEVICE(&s->ppc_irq_orgate), NULL, &err); if (err) { error_propagate(errp, err); return; @@ -1065,7 +1061,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_bool(OBJECT(&s->nmi_orgate), true, "realized", &err); + qdev_realize(DEVICE(&s->nmi_orgate), NULL, &err); if (err) { error_propagate(errp, err); return; @@ -1113,7 +1109,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_bool(splitter, true, "realized", &err); + qdev_realize(DEVICE(splitter), NULL, &err); if (err) { error_propagate(errp, err); return; @@ -1160,7 +1156,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_bool(OBJECT(splitter), true, "realized", &err); + qdev_realize(DEVICE(splitter), NULL, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 5cdd0b9..ce83586 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -216,7 +216,7 @@ static void armv7m_realize(DeviceState *dev, Error **errp) s->cpu->env.nvic = &s->nvic; s->nvic.cpu = s->cpu; - object_property_set_bool(OBJECT(s->cpu), true, "realized", &err); + qdev_realize(DEVICE(s->cpu), NULL, &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 46fe6fe..0ad08a2 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -302,8 +302,7 @@ static void aspeed_machine_init(MachineState *machine) object_property_set_int(OBJECT(&bmc->soc), ASPEED_SCU_PROT_KEY, "hw-prot-key", &error_abort); } - object_property_set_bool(OBJECT(&bmc->soc), true, "realized", - &error_abort); + qdev_realize(DEVICE(&bmc->soc), NULL, &error_abort); memory_region_add_subregion(get_system_memory(), sc->memmap[ASPEED_SDRAM], diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index d465743..6da6872 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -259,7 +259,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) * is needed when using -kernel */ - object_property_set_bool(OBJECT(&s->cpu[i]), true, "realized", &err); + qdev_realize(DEVICE(&s->cpu[i]), NULL, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index d1e48b7..810cf9b 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -230,7 +230,7 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp) /* CPU */ for (i = 0; i < sc->num_cpus; i++) { - object_property_set_bool(OBJECT(&s->cpu[i]), true, "realized", &err); + qdev_realize(DEVICE(&s->cpu[i]), NULL, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 39a63f2..ed1793f 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -133,8 +133,7 @@ static void bcm2836_realize(DeviceState *dev, Error **errp) return; } - object_property_set_bool(OBJECT(&s->cpu[n].core), true, - "realized", &err); + qdev_realize(DEVICE(&s->cpu[n].core), NULL, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 4bc4f08..a96c860 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -80,7 +80,7 @@ static void cubieboard_init(MachineState *machine) exit(1); } - object_property_set_bool(OBJECT(a10), true, "realized", &err); + qdev_realize(DEVICE(a10), NULL, &err); if (err != NULL) { error_reportf_err(err, "Couldn't realize Allwinner A10: "); exit(1); diff --git a/hw/arm/digic.c b/hw/arm/digic.c index 13acd2c..13a83f7 100644 --- a/hw/arm/digic.c +++ b/hw/arm/digic.c @@ -62,7 +62,7 @@ static void digic_realize(DeviceState *dev, Error **errp) return; } - object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err); + qdev_realize(DEVICE(&s->cpu), NULL, &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c index 518a63e..b6452d9 100644 --- a/hw/arm/digic_boards.c +++ b/hw/arm/digic_boards.c @@ -62,7 +62,7 @@ static void digic4_board_init(MachineState *machine, DigicBoard *board) exit(EXIT_FAILURE); } - object_property_set_bool(OBJECT(s), true, "realized", &err); + qdev_realize(DEVICE(s), NULL, &err); if (err != NULL) { error_reportf_err(err, "Couldn't realize DIGIC SoC: "); exit(1); diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index 2afeb73..b888a5c 100644 --- a/hw/arm/exynos4210.c +++ b/hw/arm/exynos4210.c @@ -190,7 +190,7 @@ static DeviceState *pl330_create(uint32_t base, qemu_or_irq *orgate, object_property_set_int(OBJECT(orgate), nevents + 1, "num-lines", &error_abort); - object_property_set_bool(OBJECT(orgate), true, "realized", &error_abort); + qdev_realize(DEVICE(orgate), NULL, &error_abort); for (i = 0; i < nevents + 1; i++) { sysbus_connect_irq(busdev, i, qdev_get_gpio_in(DEVICE(orgate), i)); @@ -223,7 +223,7 @@ static void exynos4210_realize(DeviceState *socdev, Error **errp) "mp-affinity", &error_abort); object_property_set_int(cpuobj, EXYNOS4210_SMP_PRIVATE_BASE_ADDR, "reset-cbar", &error_abort); - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); } /*** IRQs ***/ diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index d2c4970..fb516bd 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -85,7 +85,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp) uint8_t i; Error *err = NULL; - object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err); + qdev_realize(DEVICE(&s->cpu), NULL, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index 08236c3..42cca52 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -66,7 +66,7 @@ static void fsl_imx31_realize(DeviceState *dev, Error **errp) uint16_t i; Error *err = NULL; - object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err); + qdev_realize(DEVICE(&s->cpu), NULL, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 33b1be4..1759348 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -130,7 +130,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) "start-powered-off", &error_abort); } - object_property_set_bool(OBJECT(&s->cpu[i]), true, "realized", &err); + qdev_realize(DEVICE(&s->cpu[i]), NULL, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c index 72142cc..f8c5640 100644 --- a/hw/arm/fsl-imx6ul.c +++ b/hw/arm/fsl-imx6ul.c @@ -168,8 +168,7 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp) object_property_set_int(OBJECT(&s->cpu), QEMU_PSCI_CONDUIT_SMC, "psci-conduit", &error_abort); - object_property_set_bool(OBJECT(&s->cpu), true, - "realized", &error_abort); + qdev_realize(DEVICE(&s->cpu), NULL, &error_abort); /* * A7MPCORE diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c index aa70513..ca8b5cc 100644 --- a/hw/arm/fsl-imx7.c +++ b/hw/arm/fsl-imx7.c @@ -174,7 +174,7 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) "start-powered-off", &error_abort); } - object_property_set_bool(o, true, "realized", &error_abort); + qdev_realize(DEVICE(o), NULL, &error_abort); } /* diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index 7f279d7..c7ef48e 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -280,7 +280,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id) object_property_set_int(cpuobj, MPCORE_PERIPHBASE, "reset-cbar", &error_abort); } - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); cpu_irq[n] = qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ); cpu_fiq[n] = qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_FIQ); cpu_virq[n] = qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_VIRQ); diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c index 69b9571..af8f7f9 100644 --- a/hw/arm/imx25_pdk.c +++ b/hw/arm/imx25_pdk.c @@ -75,7 +75,7 @@ static void imx25_pdk_init(MachineState *machine) object_initialize_child(OBJECT(machine), "soc", &s->soc, TYPE_FSL_IMX25); - object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_fatal); + qdev_realize(DEVICE(&s->soc), NULL, &error_fatal); /* We need to initialize our memory */ if (machine->ram_size > (FSL_IMX25_SDRAM0_SIZE + FSL_IMX25_SDRAM1_SIZE)) { diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index a55d2c3..b11a846 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -607,7 +607,7 @@ static void integratorcp_init(MachineState *machine) object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); } - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); cpu = ARM_CPU(cpuobj); diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c index 0275d63..e3f7d4e 100644 --- a/hw/arm/kzm.c +++ b/hw/arm/kzm.c @@ -73,7 +73,7 @@ static void kzm_init(MachineState *machine) object_initialize_child(OBJECT(machine), "soc", &s->soc, TYPE_FSL_IMX31); - object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_fatal); + qdev_realize(DEVICE(&s->soc), NULL, &error_fatal); /* Check the amount of memory is compatible with the SOC */ if (machine->ram_size > (FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE)) { diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c index 769fe6d..3d1d2e3 100644 --- a/hw/arm/mcimx6ul-evk.c +++ b/hw/arm/mcimx6ul-evk.c @@ -40,7 +40,7 @@ static void mcimx6ul_evk_init(MachineState *machine) s = FSL_IMX6UL(object_new(TYPE_FSL_IMX6UL)); object_property_add_child(OBJECT(machine), "soc", OBJECT(s)); - object_property_set_bool(OBJECT(s), true, "realized", &error_fatal); + qdev_realize(DEVICE(s), NULL, &error_fatal); memory_region_add_subregion(get_system_memory(), FSL_IMX6UL_MMDC_ADDR, machine->ram); diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c index 645ad54..365f818 100644 --- a/hw/arm/mcimx7d-sabre.c +++ b/hw/arm/mcimx7d-sabre.c @@ -42,7 +42,7 @@ static void mcimx7d_sabre_init(MachineState *machine) s = FSL_IMX7(object_new(TYPE_FSL_IMX7)); object_property_add_child(OBJECT(machine), "soc", OBJECT(s)); - object_property_set_bool(OBJECT(s), true, "realized", &error_fatal); + qdev_realize(DEVICE(s), NULL, &error_fatal); memory_region_add_subregion(get_system_memory(), FSL_IMX7_MMDC_ADDR, machine->ram); diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index a2b20ff..8155c35 100644 --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -414,8 +414,7 @@ static void mps2tz_common_init(MachineState *machine) object_property_set_int(OBJECT(splitter), 2, "num-lines", &error_fatal); - object_property_set_bool(OBJECT(splitter), true, "realized", - &error_fatal); + qdev_realize(DEVICE(splitter), NULL, &error_fatal); qdev_connect_gpio_out(DEVICE(splitter), 0, qdev_get_gpio_in_named(DEVICE(&mms->iotkit), "EXP_IRQ", i)); @@ -433,8 +432,7 @@ static void mps2tz_common_init(MachineState *machine) object_property_set_int(OBJECT(&mms->sec_resp_splitter), ARRAY_SIZE(mms->ppc) + ARRAY_SIZE(mms->msc), "num-lines", &error_fatal); - object_property_set_bool(OBJECT(&mms->sec_resp_splitter), true, - "realized", &error_fatal); + qdev_realize(DEVICE(&mms->sec_resp_splitter), NULL, &error_fatal); dev_splitter = DEVICE(&mms->sec_resp_splitter); qdev_connect_gpio_out_named(iotkitdev, "sec_resp_cfg", 0, qdev_get_gpio_in(dev_splitter, 0)); @@ -466,8 +464,7 @@ static void mps2tz_common_init(MachineState *machine) &mms->uart_irq_orgate, TYPE_OR_IRQ); object_property_set_int(OBJECT(&mms->uart_irq_orgate), 10, "num-lines", &error_fatal); - object_property_set_bool(OBJECT(&mms->uart_irq_orgate), true, - "realized", &error_fatal); + qdev_realize(DEVICE(&mms->uart_irq_orgate), NULL, &error_fatal); qdev_connect_gpio_out(DEVICE(&mms->uart_irq_orgate), 0, get_sse_irq_in(mms, 15)); diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 735f44c..daa55f7 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -229,7 +229,7 @@ static void mps2_common_init(MachineState *machine) orgate = object_new(TYPE_OR_IRQ); object_property_set_int(orgate, 6, "num-lines", &error_fatal); - object_property_set_bool(orgate, true, "realized", &error_fatal); + qdev_realize(DEVICE(orgate), NULL, &error_fatal); orgate_dev = DEVICE(orgate); qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12)); @@ -266,7 +266,7 @@ static void mps2_common_init(MachineState *machine) orgate = object_new(TYPE_OR_IRQ); object_property_set_int(orgate, 10, "num-lines", &error_fatal); - object_property_set_bool(orgate, true, "realized", &error_fatal); + qdev_realize(DEVICE(orgate), NULL, &error_fatal); orgate_dev = DEVICE(orgate); qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12)); @@ -281,8 +281,7 @@ static void mps2_common_init(MachineState *machine) txrx_orgate = object_new(TYPE_OR_IRQ); object_property_set_int(txrx_orgate, 2, "num-lines", &error_fatal); - object_property_set_bool(txrx_orgate, true, "realized", - &error_fatal); + qdev_realize(DEVICE(txrx_orgate), NULL, &error_fatal); txrx_orgate_dev = DEVICE(txrx_orgate); qdev_connect_gpio_out(txrx_orgate_dev, 0, qdev_get_gpio_in(armv7m, uart_txrx_irqno[i])); diff --git a/hw/arm/musca.c b/hw/arm/musca.c index d740423..3437632 100644 --- a/hw/arm/musca.c +++ b/hw/arm/musca.c @@ -405,8 +405,7 @@ static void musca_init(MachineState *machine) object_property_set_int(OBJECT(splitter), 2, "num-lines", &error_fatal); - object_property_set_bool(OBJECT(splitter), true, "realized", - &error_fatal); + qdev_realize(DEVICE(splitter), NULL, &error_fatal); qdev_connect_gpio_out(DEVICE(splitter), 0, qdev_get_gpio_in_named(ssedev, "EXP_IRQ", i)); qdev_connect_gpio_out(DEVICE(splitter), 1, @@ -425,8 +424,7 @@ static void musca_init(MachineState *machine) object_property_set_int(OBJECT(&mms->sec_resp_splitter), ARRAY_SIZE(mms->ppc), "num-lines", &error_fatal); - object_property_set_bool(OBJECT(&mms->sec_resp_splitter), true, - "realized", &error_fatal); + qdev_realize(DEVICE(&mms->sec_resp_splitter), NULL, &error_fatal); dev_splitter = DEVICE(&mms->sec_resp_splitter); qdev_connect_gpio_out_named(ssedev, "sec_resp_cfg", 0, qdev_get_gpio_in(dev_splitter, 0)); diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c index 44a333a..678c930 100644 --- a/hw/arm/orangepi.c +++ b/hw/arm/orangepi.c @@ -86,7 +86,7 @@ static void orangepi_init(MachineState *machine) &error_abort); /* Mark H3 object realized */ - object_property_set_bool(OBJECT(h3), true, "realized", &error_abort); + qdev_realize(DEVICE(h3), NULL, &error_abort); /* Retrieve SD bus */ di = drive_get_next(IF_SD); diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 78cb995..380978f 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -287,7 +287,7 @@ static void raspi_machine_init(MachineState *machine) object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(machine->ram)); object_property_set_int(OBJECT(&s->soc), board_rev, "board-rev", &error_abort); - object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_abort); + qdev_realize(DEVICE(&s->soc), NULL, &error_abort); /* Create and plug in the SD cards */ di = drive_get_next(IF_SD); diff --git a/hw/arm/realview.c b/hw/arm/realview.c index aee7989..f3c00fe 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -114,7 +114,7 @@ static void realview_init(MachineState *machine, &error_fatal); } - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); cpu_irq[n] = qdev_get_gpio_in(DEVICE(cpuobj), ARM_CPU_IRQ); } diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c index 33d7315..a27e5ba 100644 --- a/hw/arm/sabrelite.c +++ b/hw/arm/sabrelite.c @@ -51,7 +51,7 @@ static void sabrelite_init(MachineState *machine) s = FSL_IMX6(object_new(TYPE_FSL_IMX6)); object_property_add_child(OBJECT(machine), "soc", OBJECT(s)); - object_property_set_bool(OBJECT(s), true, "realized", &error_fatal); + qdev_realize(DEVICE(s), NULL, &error_fatal); memory_region_add_subregion(get_system_memory(), FSL_IMX6_MMDC_ADDR, machine->ram); diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 3fd3536..e40c868 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -680,7 +680,7 @@ static void sbsa_ref_init(MachineState *machine) object_property_set_link(cpuobj, OBJECT(secure_sysmem), "secure-memory", &error_abort); - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); object_unref(cpuobj); } diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index e2c3479..1948754 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -155,7 +155,7 @@ static void stm32f205_soc_realize(DeviceState *dev_soc, Error **errp) /* ADC 1 to 3 */ object_property_set_int(OBJECT(s->adc_irqs), STM_NUM_ADCS, "num-lines", &err); - object_property_set_bool(OBJECT(s->adc_irqs), true, "realized", &err); + qdev_realize(DEVICE(s->adc_irqs), NULL, &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c index 9f7838a..c12d9f9 100644 --- a/hw/arm/stm32f405_soc.c +++ b/hw/arm/stm32f405_soc.c @@ -173,7 +173,7 @@ static void stm32f405_soc_realize(DeviceState *dev_soc, Error **errp) } object_property_set_int(OBJECT(&s->adc_irqs), STM_NUM_ADCS, "num-lines", &err); - object_property_set_bool(OBJECT(&s->adc_irqs), true, "realized", &err); + qdev_realize(DEVICE(&s->adc_irqs), NULL, &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index 29e3bc6..2ebdcbd 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -215,7 +215,7 @@ static void versatile_init(MachineState *machine, int board_id) object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); } - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); cpu = ARM_CPU(cpuobj); diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index bebb0ed..7ca5d52 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -229,7 +229,7 @@ static void init_cpus(MachineState *ms, const char *cpu_type, object_property_set_int(cpuobj, periphbase, "reset-cbar", &error_abort); } - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); } /* Create the private peripheral devices (including the GIC); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index c3e80bc..caceb1e 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1819,7 +1819,7 @@ static void machvirt_init(MachineState *machine) "secure-memory", &error_abort); } - object_property_set_bool(cpuobj, true, "realized", &error_fatal); + qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); object_unref(cpuobj); } fdt_add_timer_nodes(vms); diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 69d62ee..4247c4d 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -202,7 +202,7 @@ static void zynq_init(MachineState *machine) &error_fatal); object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar", &error_fatal); - object_property_set_bool(OBJECT(cpu), true, "realized", &error_fatal); + qdev_realize(DEVICE(cpu), NULL, &error_fatal); /* DDR remapped to address zero. */ memory_region_add_subregion(address_space_mem, 0, machine->ram); diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index 20f0121..fed9d07 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -47,7 +47,7 @@ static void versal_create_apu_cpus(Versal *s) "core-count", &error_abort); object_property_set_link(obj, OBJECT(&s->fpd.apu.mr), "memory", &error_abort); - object_property_set_bool(obj, true, "realized", &error_fatal); + qdev_realize(DEVICE(obj), NULL, &error_fatal); } } diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index 822e24a..b920bce 100644 --- a/hw/arm/xlnx-zcu102.c +++ b/hw/arm/xlnx-zcu102.c @@ -125,7 +125,7 @@ static void xlnx_zcu102_init(MachineState *machine) object_property_set_bool(OBJECT(&s->soc), s->virt, "virtualization", &error_fatal); - object_property_set_bool(OBJECT(&s->soc), true, "realized", &error_fatal); + qdev_realize(DEVICE(&s->soc), NULL, &error_fatal); /* Create and plug in the SD cards */ for (i = 0; i < XLNX_ZYNQMP_NUM_SDHCI; i++) { diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 446b75a..1de9d4a 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -209,15 +209,14 @@ static void xlnx_zynqmp_create_rpu(MachineState *ms, XlnxZynqMPState *s, object_property_set_bool(OBJECT(&s->rpu_cpu[i]), true, "reset-hivecs", &error_abort); - object_property_set_bool(OBJECT(&s->rpu_cpu[i]), true, "realized", - &err); + qdev_realize(DEVICE(&s->rpu_cpu[i]), NULL, &err); if (err) { error_propagate(errp, err); return; } } - qdev_init_nofail(DEVICE(&s->rpu_cluster)); + qdev_realize(DEVICE(&s->rpu_cluster), NULL, &error_fatal); } static void xlnx_zynqmp_init(Object *obj) @@ -341,7 +340,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) qdev_prop_set_bit(DEVICE(&s->gic), "has-virtualization-extensions", s->virt); - qdev_init_nofail(DEVICE(&s->apu_cluster)); + qdev_realize(DEVICE(&s->apu_cluster), NULL, &error_fatal); /* Realize APUs before realizing the GIC. KVM requires this. */ for (i = 0; i < num_apus; i++) { @@ -368,8 +367,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) "reset-cbar", &error_abort); object_property_set_int(OBJECT(&s->apu_cpu[i]), num_apus, "core-count", &error_abort); - object_property_set_bool(OBJECT(&s->apu_cpu[i]), true, "realized", - &err); + qdev_realize(DEVICE(&s->apu_cpu[i]), NULL, &err); if (err) { error_propagate(errp, err); return; |