diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-07-07 18:05:54 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-07-10 15:18:08 +0200 |
commit | 5325cc34a2ca985283134c7e264be7851b112d4e (patch) | |
tree | ba4fb68122e2dcf8860552167c56f97dc962cb00 /hw/arm | |
parent | 1c94a351644fb2555f34e63c8ddc29f70bd4803a (diff) |
qom: Put name parameter before value / visitor parameter
The object_property_set_FOO() setters take property name and value in
an unusual order:
void object_property_set_FOO(Object *obj, FOO_TYPE value,
const char *name, Error **errp)
Having to pass value before name feels grating. Swap them.
Same for object_property_set(), object_property_get(), and
object_property_parse().
Convert callers with this Coccinelle script:
@@
identifier fun = {
object_property_get, object_property_parse, object_property_set_str,
object_property_set_link, object_property_set_bool,
object_property_set_int, object_property_set_uint, object_property_set,
object_property_set_qobject
};
expression obj, v, name, errp;
@@
- fun(obj, v, name, errp)
+ fun(obj, name, v, errp)
Chokes on hw/arm/musicpal.c's lcd_refresh() with the unhelpful error
message "no position information". Convert that one manually.
Fails to convert hw/arm/armsse.c, because Coccinelle gets confused by
ARMSSE being used both as typedef and function-like macro there.
Convert manually.
Fails to convert hw/rx/rx-gdbsim.c, because Coccinelle gets confused
by RXCPU being used both as typedef and function-like macro there.
Convert manually. The other files using RXCPU that way don't need
conversion.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200707160613.848843-27-armbru@redhat.com>
[Straightforwad conflict with commit 2336172d9b "audio: set default
value for pcspk.iobase property" resolved]
Diffstat (limited to 'hw/arm')
41 files changed, 328 insertions, 346 deletions
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c index e1acffe5f6..c5d604af68 100644 --- a/hw/arm/allwinner-a10.c +++ b/hw/arm/allwinner-a10.c @@ -142,15 +142,15 @@ static void aw_a10_realize(DeviceState *dev, Error **errp) sprintf(bus, "usb-bus.%d", i); - object_property_set_bool(OBJECT(&s->ehci[i]), true, - "companion-enable", &error_fatal); + object_property_set_bool(OBJECT(&s->ehci[i]), "companion-enable", + true, &error_fatal); sysbus_realize(SYS_BUS_DEVICE(&s->ehci[i]), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(&s->ehci[i]), 0, AW_A10_EHCI_BASE + i * 0x8000); sysbus_connect_irq(SYS_BUS_DEVICE(&s->ehci[i]), 0, qdev_get_gpio_in(dev, 39 + i)); - object_property_set_str(OBJECT(&s->ohci[i]), bus, "masterbus", + object_property_set_str(OBJECT(&s->ohci[i]), "masterbus", bus, &error_fatal); sysbus_realize(SYS_BUS_DEVICE(&s->ohci[i]), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(&s->ohci[i]), 0, diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 9a48bf86c3..1f8ce94ecc 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -534,21 +534,21 @@ static void armsse_realize(DeviceState *dev, Error **errp) * later if necessary. */ if (extract32(info->cpuwait_rst, i, 1)) { - object_property_set_bool(cpuobj, true, "start-powered-off", &err); + object_property_set_bool(cpuobj, "start-powered-off", true, &err); if (err) { error_propagate(errp, err); return; } } if (!s->cpu_fpu[i]) { - object_property_set_bool(cpuobj, false, "vfp", &err); + object_property_set_bool(cpuobj, "vfp", false, &err); if (err) { error_propagate(errp, err); return; } } if (!s->cpu_dsp[i]) { - object_property_set_bool(cpuobj, false, "dsp", &err); + object_property_set_bool(cpuobj, "dsp", false, &err); if (err) { error_propagate(errp, err); return; @@ -562,9 +562,9 @@ static void armsse_realize(DeviceState *dev, Error **errp) memory_region_add_subregion_overlap(&s->cpu_container[i], 0, &s->container, -1); } - object_property_set_link(cpuobj, OBJECT(&s->cpu_container[i]), - "memory", &error_abort); - object_property_set_link(cpuobj, OBJECT(s), "idau", &error_abort); + object_property_set_link(cpuobj, "memory", + OBJECT(&s->cpu_container[i]), &error_abort); + object_property_set_link(cpuobj, "idau", OBJECT(s), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(cpuobj), &err)) { error_propagate(errp, err); return; @@ -604,8 +604,8 @@ static void armsse_realize(DeviceState *dev, Error **errp) DeviceState *devs = DEVICE(splitter); int cpunum; - object_property_set_int(splitter, info->num_cpus, - "num-lines", &err); + object_property_set_int(splitter, "num-lines", info->num_cpus, + &err); if (err) { error_propagate(errp, err); return; @@ -658,8 +658,8 @@ static void armsse_realize(DeviceState *dev, Error **errp) * multiple lines, one for each of the PPCs within the ARMSSE and one * that will be an output from the ARMSSE to the system. */ - object_property_set_int(OBJECT(&s->sec_resp_splitter), 3, - "num-lines", &err); + object_property_set_int(OBJECT(&s->sec_resp_splitter), "num-lines", 3, + &err); if (err) { error_propagate(errp, err); return; @@ -685,8 +685,8 @@ static void armsse_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_link(OBJECT(&s->mpc[i]), OBJECT(&s->sram[i]), - "downstream", &error_abort); + object_property_set_link(OBJECT(&s->mpc[i]), "downstream", + OBJECT(&s->sram[i]), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->mpc[i]), &err)) { error_propagate(errp, err); return; @@ -702,9 +702,8 @@ static void armsse_realize(DeviceState *dev, Error **errp) } /* We must OR together lines from the MPC splitters to go to the NVIC */ - object_property_set_int(OBJECT(&s->mpc_irq_orgate), - IOTS_NUM_EXP_MPC + info->sram_banks, - "num-lines", &err); + object_property_set_int(OBJECT(&s->mpc_irq_orgate), "num-lines", + IOTS_NUM_EXP_MPC + info->sram_banks, &err); if (err) { error_propagate(errp, err); return; @@ -734,7 +733,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->timer0), 0, armsse_get_common_irq_in(s, 3)); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->timer0), 0); - object_property_set_link(OBJECT(&s->apb_ppc0), OBJECT(mr), "port[0]", + object_property_set_link(OBJECT(&s->apb_ppc0), "port[0]", OBJECT(mr), &error_abort); qdev_prop_set_uint32(DEVICE(&s->timer1), "pclk-frq", s->mainclk_frq); @@ -745,7 +744,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->timer1), 0, armsse_get_common_irq_in(s, 4)); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->timer1), 0); - object_property_set_link(OBJECT(&s->apb_ppc0), OBJECT(mr), "port[1]", + object_property_set_link(OBJECT(&s->apb_ppc0), "port[1]", OBJECT(mr), &error_abort); qdev_prop_set_uint32(DEVICE(&s->dualtimer), "pclk-frq", s->mainclk_frq); @@ -756,7 +755,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->dualtimer), 0, armsse_get_common_irq_in(s, 5)); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->dualtimer), 0); - object_property_set_link(OBJECT(&s->apb_ppc0), OBJECT(mr), "port[2]", + object_property_set_link(OBJECT(&s->apb_ppc0), "port[2]", OBJECT(mr), &error_abort); if (info->has_mhus) { @@ -780,8 +779,8 @@ static void armsse_realize(DeviceState *dev, Error **errp) } port = g_strdup_printf("port[%d]", i + 3); mr = sysbus_mmio_get_region(mhu_sbd, 0); - object_property_set_link(OBJECT(&s->apb_ppc0), OBJECT(mr), - port, &error_abort); + object_property_set_link(OBJECT(&s->apb_ppc0), port, OBJECT(mr), + &error_abort); g_free(port); /* @@ -842,8 +841,8 @@ static void armsse_realize(DeviceState *dev, Error **errp) * ones) are sent individually to the security controller, and also * ORed together to give a single combined PPC interrupt to the NVIC. */ - object_property_set_int(OBJECT(&s->ppc_irq_orgate), - NUM_PPCS, "num-lines", &err); + object_property_set_int(OBJECT(&s->ppc_irq_orgate), "num-lines", NUM_PPCS, + &err); if (err) { error_propagate(errp, err); return; @@ -923,7 +922,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->s32ktimer), 0, armsse_get_common_irq_in(s, 2)); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->s32ktimer), 0); - object_property_set_link(OBJECT(&s->apb_ppc1), OBJECT(mr), "port[0]", + object_property_set_link(OBJECT(&s->apb_ppc1), "port[0]", OBJECT(mr), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->apb_ppc1), &err)) { @@ -950,15 +949,14 @@ static void armsse_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in_named(dev_apb_ppc1, "cfg_sec_resp", 0)); - object_property_set_int(OBJECT(&s->sysinfo), info->sys_version, - "SYS_VERSION", &err); + object_property_set_int(OBJECT(&s->sysinfo), "SYS_VERSION", + info->sys_version, &err); if (err) { error_propagate(errp, err); return; } - object_property_set_int(OBJECT(&s->sysinfo), - armsse_sys_config_value(s, info), - "SYS_CONFIG", &err); + object_property_set_int(OBJECT(&s->sysinfo), "SYS_CONFIG", + armsse_sys_config_value(s, info), &err); if (err) { error_propagate(errp, err); return; @@ -970,14 +968,14 @@ static void armsse_realize(DeviceState *dev, Error **errp) /* System information registers */ sysbus_mmio_map(SYS_BUS_DEVICE(&s->sysinfo), 0, 0x40020000); /* System control registers */ - object_property_set_int(OBJECT(&s->sysctl), info->sys_version, - "SYS_VERSION", &error_abort); - object_property_set_int(OBJECT(&s->sysctl), info->cpuwait_rst, - "CPUWAIT_RST", &error_abort); - object_property_set_int(OBJECT(&s->sysctl), s->init_svtor, - "INITSVTOR0_RST", &error_abort); - object_property_set_int(OBJECT(&s->sysctl), s->init_svtor, - "INITSVTOR1_RST", &error_abort); + object_property_set_int(OBJECT(&s->sysctl), "SYS_VERSION", + info->sys_version, &error_abort); + object_property_set_int(OBJECT(&s->sysctl), "CPUWAIT_RST", + info->cpuwait_rst, &error_abort); + object_property_set_int(OBJECT(&s->sysctl), "INITSVTOR0_RST", + s->init_svtor, &error_abort); + object_property_set_int(OBJECT(&s->sysctl), "INITSVTOR1_RST", + s->init_svtor, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->sysctl), &err)) { error_propagate(errp, err); return; @@ -1007,7 +1005,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) } /* This OR gate wires together outputs from the secure watchdogs to NMI */ - object_property_set_int(OBJECT(&s->nmi_orgate), 2, "num-lines", &err); + object_property_set_int(OBJECT(&s->nmi_orgate), "num-lines", 2, &err); if (err) { error_propagate(errp, err); return; @@ -1051,7 +1049,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) for (i = 0; i < ARRAY_SIZE(s->ppc_irq_splitter); i++) { Object *splitter = OBJECT(&s->ppc_irq_splitter[i]); - object_property_set_int(splitter, 2, "num-lines", &err); + object_property_set_int(splitter, "num-lines", 2, &err); if (err) { error_propagate(errp, err); return; @@ -1097,7 +1095,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) SplitIRQ *splitter = &s->mpc_irq_splitter[i]; DeviceState *dev_splitter = DEVICE(splitter); - object_property_set_int(OBJECT(splitter), 2, "num-lines", &err); + object_property_set_int(OBJECT(splitter), "num-lines", 2, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 28baf330e5..923f7fad40 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -167,39 +167,37 @@ static void armv7m_realize(DeviceState *dev, Error **errp) return; } - object_property_set_link(OBJECT(s->cpu), OBJECT(&s->container), "memory", + object_property_set_link(OBJECT(s->cpu), "memory", OBJECT(&s->container), &error_abort); if (object_property_find(OBJECT(s->cpu), "idau", NULL)) { - object_property_set_link(OBJECT(s->cpu), s->idau, "idau", + object_property_set_link(OBJECT(s->cpu), "idau", s->idau, &error_abort); } if (object_property_find(OBJECT(s->cpu), "init-svtor", NULL)) { - object_property_set_uint(OBJECT(s->cpu), s->init_svtor, - "init-svtor", &err); + object_property_set_uint(OBJECT(s->cpu), "init-svtor", s->init_svtor, + &err); if (err != NULL) { error_propagate(errp, err); return; } } if (object_property_find(OBJECT(s->cpu), "start-powered-off", NULL)) { - object_property_set_bool(OBJECT(s->cpu), s->start_powered_off, - "start-powered-off", &err); + object_property_set_bool(OBJECT(s->cpu), "start-powered-off", + s->start_powered_off, &err); if (err != NULL) { error_propagate(errp, err); return; } } if (object_property_find(OBJECT(s->cpu), "vfp", NULL)) { - object_property_set_bool(OBJECT(s->cpu), s->vfp, - "vfp", &err); + object_property_set_bool(OBJECT(s->cpu), "vfp", s->vfp, &err); if (err != NULL) { error_propagate(errp, err); return; } } if (object_property_find(OBJECT(s->cpu), "dsp", NULL)) { - object_property_set_bool(OBJECT(s->cpu), s->dsp, - "dsp", &err); + object_property_set_bool(OBJECT(s->cpu), "dsp", s->dsp, &err); if (err != NULL) { error_propagate(errp, err); return; @@ -245,13 +243,13 @@ static void armv7m_realize(DeviceState *dev, Error **errp) Object *obj = OBJECT(&s->bitband[i]); SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]); - object_property_set_int(obj, bitband_input_addr[i], "base", &err); + object_property_set_int(obj, "base", bitband_input_addr[i], &err); if (err != NULL) { error_propagate(errp, err); return; } - object_property_set_link(obj, OBJECT(s->board_memory), - "source-memory", &error_abort); + object_property_set_link(obj, "source-memory", + OBJECT(s->board_memory), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(obj), &err)) { error_propagate(errp, err); return; diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 379f9672a5..660dcb5414 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -277,7 +277,7 @@ static void aspeed_machine_init(MachineState *machine) /* * This will error out if isize is not supported by memory controller. */ - object_property_set_uint(OBJECT(&bmc->soc), ram_size, "ram-size", + object_property_set_uint(OBJECT(&bmc->soc), "ram-size", ram_size, &error_fatal); for (i = 0; i < sc->macs_num; i++) { @@ -288,22 +288,22 @@ static void aspeed_machine_init(MachineState *machine) } } - object_property_set_int(OBJECT(&bmc->soc), amc->hw_strap1, "hw-strap1", + object_property_set_int(OBJECT(&bmc->soc), "hw-strap1", amc->hw_strap1, &error_abort); - object_property_set_int(OBJECT(&bmc->soc), amc->hw_strap2, "hw-strap2", + object_property_set_int(OBJECT(&bmc->soc), "hw-strap2", amc->hw_strap2, &error_abort); - object_property_set_int(OBJECT(&bmc->soc), amc->num_cs, "num-cs", + object_property_set_int(OBJECT(&bmc->soc), "num-cs", amc->num_cs, &error_abort); - object_property_set_link(OBJECT(&bmc->soc), OBJECT(&bmc->ram_container), - "dram", &error_abort); + object_property_set_link(OBJECT(&bmc->soc), "dram", + OBJECT(&bmc->ram_container), &error_abort); if (machine->kernel_filename) { /* * When booting with a -kernel command line there is no u-boot * that runs to unlock the SCU. In this case set the default to * be unlocked as the kernel expects */ - object_property_set_int(OBJECT(&bmc->soc), ASPEED_SCU_PROT_KEY, - "hw-prot-key", &error_abort); + object_property_set_int(OBJECT(&bmc->soc), "hw-prot-key", + ASPEED_SCU_PROT_KEY, &error_abort); } qdev_realize(DEVICE(&bmc->soc), NULL, &error_abort); @@ -393,10 +393,10 @@ static void palmetto_bmc_i2c_init(AspeedMachineState *bmc) /* add a TMP423 temperature sensor */ dev = i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 2), "tmp423", 0x4c); - object_property_set_int(OBJECT(dev), 31000, "temperature0", &error_abort); - object_property_set_int(OBJECT(dev), 28000, "temperature1", &error_abort); - object_property_set_int(OBJECT(dev), 20000, "temperature2", &error_abort); - object_property_set_int(OBJECT(dev), 110000, "temperature3", &error_abort); + object_property_set_int(OBJECT(dev), "temperature0", 31000, &error_abort); + object_property_set_int(OBJECT(dev), "temperature1", 28000, &error_abort); + object_property_set_int(OBJECT(dev), "temperature2", 20000, &error_abort); + object_property_set_int(OBJECT(dev), "temperature3", 110000, &error_abort); } static void ast2500_evb_i2c_init(AspeedMachineState *bmc) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index b9ae4c12b4..e6e2cf0737 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -196,7 +196,7 @@ static void aspeed_soc_ast2600_init(Object *obj) object_initialize_child(obj, "sd-controller", &s->sdhci, TYPE_ASPEED_SDHCI); - object_property_set_int(OBJECT(&s->sdhci), 2, "num-slots", &error_abort); + object_property_set_int(OBJECT(&s->sdhci), "num-slots", 2, &error_abort); /* Init sd card slot class here so that they're under the correct parent */ for (i = 0; i < ASPEED_SDHCI_NUM_SLOTS; ++i) { @@ -207,7 +207,7 @@ static void aspeed_soc_ast2600_init(Object *obj) object_initialize_child(obj, "emmc-controller", &s->emmc, TYPE_ASPEED_SDHCI); - object_property_set_int(OBJECT(&s->emmc), 1, "num-slots", &error_abort); + object_property_set_int(OBJECT(&s->emmc), "num-slots", 1, &error_abort); object_initialize_child(obj, "emmc-controller.sdhci", &s->emmc.slots[0], TYPE_SYSBUS_SDHCI); @@ -241,17 +241,16 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) /* CPU */ for (i = 0; i < sc->num_cpus; i++) { - object_property_set_int(OBJECT(&s->cpu[i]), QEMU_PSCI_CONDUIT_SMC, - "psci-conduit", &error_abort); + object_property_set_int(OBJECT(&s->cpu[i]), "psci-conduit", + QEMU_PSCI_CONDUIT_SMC, &error_abort); if (sc->num_cpus > 1) { - object_property_set_int(OBJECT(&s->cpu[i]), - ASPEED_A7MPCORE_ADDR, - "reset-cbar", &error_abort); + object_property_set_int(OBJECT(&s->cpu[i]), "reset-cbar", + ASPEED_A7MPCORE_ADDR, &error_abort); } - object_property_set_int(OBJECT(&s->cpu[i]), aspeed_calc_affinity(i), - "mp-affinity", &error_abort); + object_property_set_int(OBJECT(&s->cpu[i]), "mp-affinity", + aspeed_calc_affinity(i), &error_abort); - object_property_set_int(OBJECT(&s->cpu[i]), 1125000000, "cntfrq", + object_property_set_int(OBJECT(&s->cpu[i]), "cntfrq", 1125000000, &error_abort); /* @@ -266,11 +265,11 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) } /* A7MPCORE */ - object_property_set_int(OBJECT(&s->a7mpcore), sc->num_cpus, "num-cpu", + object_property_set_int(OBJECT(&s->a7mpcore), "num-cpu", sc->num_cpus, &error_abort); - object_property_set_int(OBJECT(&s->a7mpcore), + object_property_set_int(OBJECT(&s->a7mpcore), "num-irq", ASPEED_SOC_AST2600_MAX_IRQ + GIC_INTERNAL, - "num-irq", &error_abort); + &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->a7mpcore), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->a7mpcore), 0, ASPEED_A7MPCORE_ADDR); @@ -316,8 +315,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) aspeed_soc_get_irq(s, ASPEED_RTC)); /* Timer */ - object_property_set_link(OBJECT(&s->timerctrl), - OBJECT(&s->scu), "scu", &error_abort); + object_property_set_link(OBJECT(&s->timerctrl), "scu", OBJECT(&s->scu), + &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->timerctrl), &err)) { error_propagate(errp, err); return; @@ -337,7 +336,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) } /* I2C */ - object_property_set_link(OBJECT(&s->i2c), OBJECT(s->dram_mr), "dram", + object_property_set_link(OBJECT(&s->i2c), "dram", OBJECT(s->dram_mr), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->i2c), &err)) { error_propagate(errp, err); @@ -355,10 +354,10 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) } /* FMC, The number of CS is set at the board level */ - object_property_set_link(OBJECT(&s->fmc), OBJECT(s->dram_mr), "dram", + object_property_set_link(OBJECT(&s->fmc), "dram", OBJECT(s->dram_mr), &error_abort); - object_property_set_int(OBJECT(&s->fmc), sc->memmap[ASPEED_SDRAM], - "sdram-base", &err); + object_property_set_int(OBJECT(&s->fmc), "sdram-base", + sc->memmap[ASPEED_SDRAM], &err); if (err) { error_propagate(errp, err); return; @@ -375,10 +374,9 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) /* SPI */ for (i = 0; i < sc->spis_num; i++) { - object_property_set_link(OBJECT(&s->spi[i]), OBJECT(s->dram_mr), - "dram", &error_abort); - object_property_set_int(OBJECT(&s->spi[i]), 1, "num-cs", - &error_abort); + object_property_set_link(OBJECT(&s->spi[i]), "dram", + OBJECT(s->dram_mr), &error_abort); + object_property_set_int(OBJECT(&s->spi[i]), "num-cs", 1, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), &err)) { error_propagate(errp, err); return; @@ -412,8 +410,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) for (i = 0; i < sc->wdts_num; i++) { AspeedWDTClass *awc = ASPEED_WDT_GET_CLASS(&s->wdt[i]); - object_property_set_link(OBJECT(&s->wdt[i]), - OBJECT(&s->scu), "scu", &error_abort); + object_property_set_link(OBJECT(&s->wdt[i]), "scu", OBJECT(&s->scu), + &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), &err)) { error_propagate(errp, err); return; @@ -424,7 +422,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) /* Net */ for (i = 0; i < sc->macs_num; i++) { - object_property_set_bool(OBJECT(&s->ftgmac100[i]), true, "aspeed", + object_property_set_bool(OBJECT(&s->ftgmac100[i]), "aspeed", true, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->ftgmac100[i]), &err)) { error_propagate(errp, err); @@ -435,8 +433,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->ftgmac100[i]), 0, aspeed_soc_get_irq(s, ASPEED_ETH1 + i)); - object_property_set_link(OBJECT(&s->mii[i]), OBJECT(&s->ftgmac100[i]), - "nic", &error_abort); + object_property_set_link(OBJECT(&s->mii[i]), "nic", + OBJECT(&s->ftgmac100[i]), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->mii[i]), &err)) { error_propagate(errp, err); return; diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index fa56f96f92..27704d87ea 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -204,7 +204,7 @@ static void aspeed_soc_init(Object *obj) object_initialize_child(obj, "sdc", &s->sdhci, TYPE_ASPEED_SDHCI); - object_property_set_int(OBJECT(&s->sdhci), 2, "num-slots", &error_abort); + object_property_set_int(OBJECT(&s->sdhci), "num-slots", 2, &error_abort); /* Init sd card slot class here so that they're under the correct parent */ for (i = 0; i < ASPEED_SDHCI_NUM_SLOTS; ++i) { @@ -274,8 +274,8 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp) aspeed_soc_get_irq(s, ASPEED_RTC)); /* Timer */ - object_property_set_link(OBJECT(&s->timerctrl), - OBJECT(&s->scu), "scu", &error_abort); + object_property_set_link(OBJECT(&s->timerctrl), "scu", OBJECT(&s->scu), + &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->timerctrl), &err)) { error_propagate(errp, err); return; @@ -295,7 +295,7 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp) } /* I2C */ - object_property_set_link(OBJECT(&s->i2c), OBJECT(s->dram_mr), "dram", + object_property_set_link(OBJECT(&s->i2c), "dram", OBJECT(s->dram_mr), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->i2c), &err)) { error_propagate(errp, err); @@ -306,10 +306,10 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp) aspeed_soc_get_irq(s, ASPEED_I2C)); /* FMC, The number of CS is set at the board level */ - object_property_set_link(OBJECT(&s->fmc), OBJECT(s->dram_mr), "dram", + object_property_set_link(OBJECT(&s->fmc), "dram", OBJECT(s->dram_mr), &error_abort); - object_property_set_int(OBJECT(&s->fmc), sc->memmap[ASPEED_SDRAM], - "sdram-base", &err); + object_property_set_int(OBJECT(&s->fmc), "sdram-base", + sc->memmap[ASPEED_SDRAM], &err); if (err) { error_propagate(errp, err); return; @@ -326,8 +326,7 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp) /* SPI */ for (i = 0; i < sc->spis_num; i++) { - object_property_set_int(OBJECT(&s->spi[i]), 1, "num-cs", - &error_abort); + object_property_set_int(OBJECT(&s->spi[i]), "num-cs", 1, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), &err)) { error_propagate(errp, err); return; @@ -361,8 +360,8 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp) for (i = 0; i < sc->wdts_num; i++) { AspeedWDTClass *awc = ASPEED_WDT_GET_CLASS(&s->wdt[i]); - object_property_set_link(OBJECT(&s->wdt[i]), - OBJECT(&s->scu), "scu", &error_abort); + object_property_set_link(OBJECT(&s->wdt[i]), "scu", OBJECT(&s->scu), + &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), &err)) { error_propagate(errp, err); return; @@ -373,7 +372,7 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp) /* Net */ for (i = 0; i < sc->macs_num; i++) { - object_property_set_bool(OBJECT(&s->ftgmac100[i]), true, "aspeed", + object_property_set_bool(OBJECT(&s->ftgmac100[i]), "aspeed", true, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->ftgmac100[i]), &err)) { error_propagate(errp, err); diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index beade39e41..a6ccf3b368 100644 --- a/hw/arm/bcm2835_peripherals.c +++ b/hw/arm/bcm2835_peripherals.c @@ -222,8 +222,8 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp) return; } - object_property_set_uint(OBJECT(&s->fb), ram_size - vcram_size, - "vcram-base", &err); + object_property_set_uint(OBJECT(&s->fb), "vcram-base", + ram_size - vcram_size, &err); if (err) { error_propagate(errp, err); return; @@ -270,11 +270,11 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp) * For the exact details please refer to the Arasan documentation: * SD3.0_Host_AHB_eMMC4.4_Usersguide_ver5.9_jan11_10.pdf */ - object_property_set_uint(OBJECT(&s->sdhci), 3, "sd-spec-version", + object_property_set_uint(OBJECT(&s->sdhci), "sd-spec-version", 3, &error_abort); - object_property_set_uint(OBJECT(&s->sdhci), BCM2835_SDHC_CAPAREG, "capareg", - &error_abort); - object_property_set_bool(OBJECT(&s->sdhci), true, "pending-insert-quirk", + object_property_set_uint(OBJECT(&s->sdhci), "capareg", + BCM2835_SDHC_CAPAREG, &error_abort); + object_property_set_bool(OBJECT(&s->sdhci), "pending-insert-quirk", true, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->sdhci), &err)) { error_propagate(errp, err); diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 70ca2f0d9a..91d31a5cb7 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -110,17 +110,16 @@ static void bcm2836_realize(DeviceState *dev, Error **errp) s->cpu[n].core.mp_affinity = (info->clusterid << 8) | n; /* set periphbase/CBAR value for CPU-local registers */ - object_property_set_int(OBJECT(&s->cpu[n].core), - info->peri_base, - "reset-cbar", &err); + object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar", + info->peri_base, &err); if (err) { error_propagate(errp, err); return; } /* start powered off if not enabled */ - object_property_set_bool(OBJECT(&s->cpu[n].core), n >= s->enabled_cpus, - "start-powered-off", &err); + object_property_set_bool(OBJECT(&s->cpu[n].core), "start-powered-off", + n >= s->enabled_cpus, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index c720e24ced..302919246b 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -62,19 +62,19 @@ static void cubieboard_init(MachineState *machine) object_property_add_child(OBJECT(machine), "soc", OBJECT(a10)); object_unref(OBJECT(a10)); - object_property_set_int(OBJECT(&a10->emac), 1, "phy-addr", &err); + object_property_set_int(OBJECT(&a10->emac), "phy-addr", 1, &err); if (err != NULL) { error_reportf_err(err, "Couldn't set phy address: "); exit(1); } - object_property_set_int(OBJECT(&a10->timer), 32768, "clk0-freq", &err); + object_property_set_int(OBJECT(&a10->timer), "clk0-freq", 32768, &err); if (err != NULL) { error_reportf_err(err, "Couldn't set clk0 frequency: "); exit(1); } - object_property_set_int(OBJECT(&a10->timer), 24000000, "clk1-freq", &err); + object_property_set_int(OBJECT(&a10->timer), "clk1-freq", 24000000, &err); if (err != NULL) { error_reportf_err(err, "Couldn't set clk1 frequency: "); exit(1); diff --git a/hw/arm/digic.c b/hw/arm/digic.c index 1494c2900a..ffc89d86b8 100644 --- a/hw/arm/digic.c +++ b/hw/arm/digic.c @@ -56,7 +56,7 @@ static void digic_realize(DeviceState *dev, Error **errp) SysBusDevice *sbd; int i; - object_property_set_bool(OBJECT(&s->cpu), true, "reset-hivecs", &err); + object_property_set_bool(OBJECT(&s->cpu), "reset-hivecs", true, &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index fa639806ec..081bbff317 100644 --- a/hw/arm/exynos4210.c +++ b/hw/arm/exynos4210.c @@ -188,7 +188,7 @@ static DeviceState *pl330_create(uint32_t base, qemu_or_irq *orgate, sysbus_realize_and_unref(busdev, &error_fatal); sysbus_mmio_map(busdev, 0, base); - object_property_set_int(OBJECT(orgate), nevents + 1, "num-lines", + object_property_set_int(OBJECT(orgate), "num-lines", nevents + 1, &error_abort); qdev_realize(DEVICE(orgate), NULL, &error_abort); @@ -215,14 +215,15 @@ static void exynos4210_realize(DeviceState *socdev, Error **errp) * support EL3 so the CPU EL3 property is disabled before realization. */ if (object_property_find(cpuobj, "has_el3", NULL)) { - object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); + object_property_set_bool(cpuobj, "has_el3", false, &error_fatal); } s->cpu[n] = ARM_CPU(cpuobj); - object_property_set_int(cpuobj, exynos4210_calc_affinity(n), - "mp-affinity", &error_abort); - object_property_set_int(cpuobj, EXYNOS4210_SMP_PRIVATE_BASE_ADDR, - "reset-cbar", &error_abort); + object_property_set_int(cpuobj, "mp-affinity", + exynos4210_calc_affinity(n), &error_abort); + object_property_set_int(cpuobj, "reset-cbar", + EXYNOS4210_SMP_PRIVATE_BASE_ADDR, + &error_abort); qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); } diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 250681f045..ea72a02d06 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -249,14 +249,12 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp) { FSL_IMX25_ESDHC2_ADDR, FSL_IMX25_ESDHC2_IRQ }, }; - object_property_set_uint(OBJECT(&s->esdhc[i]), 2, "sd-spec-version", - &error_abort); - object_property_set_uint(OBJECT(&s->esdhc[i]), IMX25_ESDHC_CAPABILITIES, - "capareg", - &error_abort); - object_property_set_uint(OBJECT(&s->esdhc[i]), SDHCI_VENDOR_IMX, - "vendor", + object_property_set_uint(OBJECT(&s->esdhc[i]), "sd-spec-version", 2, &error_abort); + object_property_set_uint(OBJECT(&s->esdhc[i]), "capareg", + IMX25_ESDHC_CAPABILITIES, &error_abort); + object_property_set_uint(OBJECT(&s->esdhc[i]), "vendor", + SDHCI_VENDOR_IMX, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->esdhc[i]), &err)) { error_propagate(errp, err); return; @@ -285,7 +283,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp) } /* Watchdog */ - object_property_set_bool(OBJECT(&s->wdt), true, "pretimeout-support", + object_property_set_bool(OBJECT(&s->wdt), "pretimeout-support", true, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->wdt), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt), 0, FSL_IMX25_WDT_ADDR); diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index 4f007ea5e8..23a5f50175 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -179,7 +179,7 @@ static void fsl_imx31_realize(DeviceState *dev, Error **errp) { FSL_IMX31_GPIO3_ADDR, FSL_IMX31_GPIO3_IRQ } }; - object_property_set_bool(OBJECT(&s->gpio[i]), false, "has-edge-sel", + object_property_set_bool(OBJECT(&s->gpio[i]), "has-edge-sel", false, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio[i]), &err)) { error_propagate(errp, err); diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 417ca6889c..e359ee579d 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -120,14 +120,14 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) /* On uniprocessor, the CBAR is set to 0 */ if (smp_cpus > 1) { - object_property_set_int(OBJECT(&s->cpu[i]), FSL_IMX6_A9MPCORE_ADDR, - "reset-cbar", &error_abort); + object_property_set_int(OBJECT(&s->cpu[i]), "reset-cbar", + FSL_IMX6_A9MPCORE_ADDR, &error_abort); } /* All CPU but CPU 0 start in power off mode */ if (i) { - object_property_set_bool(OBJECT(&s->cpu[i]), true, - "start-powered-off", &error_abort); + object_property_set_bool(OBJECT(&s->cpu[i]), "start-powered-off", + true, &error_abort); } if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, &err)) { @@ -136,12 +136,11 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) } } - object_property_set_int(OBJECT(&s->a9mpcore), smp_cpus, "num-cpu", + object_property_set_int(OBJECT(&s->a9mpcore), "num-cpu", smp_cpus, &error_abort); - object_property_set_int(OBJECT(&s->a9mpcore), - FSL_IMX6_MAX_IRQ + GIC_INTERNAL, "num-irq", - &error_abort); + object_property_set_int(OBJECT(&s->a9mpcore), "num-irq", + FSL_IMX6_MAX_IRQ + GIC_INTERNAL, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->a9mpcore), &err)) { error_propagate(errp, err); @@ -295,10 +294,10 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) }, }; - object_property_set_bool(OBJECT(&s->gpio[i]), true, "has-edge-sel", - &error_abort); - object_property_set_bool(OBJECT(&s->gpio[i]), true, "has-upper-pin-irq", + object_property_set_bool(OBJECT(&s->gpio[i]), "has-edge-sel", true, &error_abort); + object_property_set_bool(OBJECT(&s->gpio[i]), "has-upper-pin-irq", + true, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio[i]), &err)) { error_propagate(errp, err); return; @@ -326,14 +325,12 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) }; /* UHS-I SDIO3.0 SDR104 1.8V ADMA */ - object_property_set_uint(OBJECT(&s->esdhc[i]), 3, "sd-spec-version", - &error_abort); - object_property_set_uint(OBJECT(&s->esdhc[i]), IMX6_ESDHC_CAPABILITIES, - "capareg", - &error_abort); - object_property_set_uint(OBJECT(&s->esdhc[i]), SDHCI_VENDOR_IMX, - "vendor", + object_property_set_uint(OBJECT(&s->esdhc[i]), "sd-spec-version", 3, &error_abort); + object_property_set_uint(OBJECT(&s->esdhc[i]), "capareg", + IMX6_ESDHC_CAPABILITIES, &error_abort); + object_property_set_uint(OBJECT(&s->esdhc[i]), "vendor", + SDHCI_VENDOR_IMX, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->esdhc[i]), &err)) { error_propagate(errp, err); return; @@ -417,8 +414,8 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) FSL_IMX6_WDOG2_IRQ, }; - object_property_set_bool(OBJECT(&s->wdt[i]), true, "pretimeout-support", - &error_abort); + object_property_set_bool(OBJECT(&s->wdt[i]), "pretimeout-support", + true, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0, FSL_IMX6_WDOGn_ADDR[i]); diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c index 51b2f256ec..e0128d7316 100644 --- a/hw/arm/fsl-imx6ul.c +++ b/hw/arm/fsl-imx6ul.c @@ -166,17 +166,16 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp) return; } - object_property_set_int(OBJECT(&s->cpu), QEMU_PSCI_CONDUIT_SMC, - "psci-conduit", &error_abort); + object_property_set_int(OBJECT(&s->cpu), "psci-conduit", + QEMU_PSCI_CONDUIT_SMC, &error_abort); qdev_realize(DEVICE(&s->cpu), NULL, &error_abort); /* * A7MPCORE */ - object_property_set_int(OBJECT(&s->a7mpcore), 1, "num-cpu", &error_abort); - object_property_set_int(OBJECT(&s->a7mpcore), - FSL_IMX6UL_MAX_IRQ + GIC_INTERNAL, - "num-irq", &error_abort); + object_property_set_int(OBJECT(&s->a7mpcore), "num-cpu", 1, &error_abort); + object_property_set_int(OBJECT(&s->a7mpcore), "num-irq", + FSL_IMX6UL_MAX_IRQ + GIC_INTERNAL, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->a7mpcore), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->a7mpcore), 0, FSL_IMX6UL_A7MPCORE_ADDR); @@ -427,12 +426,10 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp) FSL_IMX6UL_ENET2_TIMER_IRQ, }; - object_property_set_uint(OBJECT(&s->eth[i]), - s->phy_num[i], - "phy-num", &error_abort); - object_property_set_uint(OBJECT(&s->eth[i]), - FSL_IMX6UL_ETH_NUM_TX_RINGS, - "tx-ring-num", &error_abort); + object_property_set_uint(OBJECT(&s->eth[i]), "phy-num", + s->phy_num[i], &error_abort); + object_property_set_uint(OBJECT(&s->eth[i]), "tx-ring-num", + FSL_IMX6UL_ETH_NUM_TX_RINGS, &error_abort); qdev_set_nic_properties(DEVICE(&s->eth[i]), &nd_table[i]); sysbus_realize(SYS_BUS_DEVICE(&s->eth[i]), &error_abort); @@ -482,8 +479,8 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp) FSL_IMX6UL_USDHC2_IRQ, }; - object_property_set_uint(OBJECT(&s->usdhc[i]), SDHCI_VENDOR_IMX, - "vendor", &error_abort); + object_property_set_uint(OBJECT(&s->usdhc[i]), "vendor", + SDHCI_VENDOR_IMX, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->usdhc[i]), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->usdhc[i]), 0, @@ -515,8 +512,8 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp) FSL_IMX6UL_WDOG3_IRQ, }; - object_property_set_bool(OBJECT(&s->wdt[i]), true, "pretimeout-support", - &error_abort); + object_property_set_bool(OBJECT(&s->wdt[i]), "pretimeout-support", + true, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0, diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c index b49d895a41..fad637d328 100644 --- a/hw/arm/fsl-imx7.c +++ b/hw/arm/fsl-imx7.c @@ -159,19 +159,19 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) for (i = 0; i < smp_cpus; i++) { o = OBJECT(&s->cpu[i]); - object_property_set_int(o, QEMU_PSCI_CONDUIT_SMC, - "psci-conduit", &error_abort); + object_property_set_int(o, "psci-conduit", QEMU_PSCI_CONDUIT_SMC, + &error_abort); /* On uniprocessor, the CBAR is set to 0 */ if (smp_cpus > 1) { - object_property_set_int(o, FSL_IMX7_A7MPCORE_ADDR, - "reset-cbar", &error_abort); + object_property_set_int(o, "reset-cbar", FSL_IMX7_A7MPCORE_ADDR, + &error_abort); } if (i) { /* Secondary CPUs start in PSCI powered-down state */ - object_property_set_bool(o, true, - "start-powered-off", &error_abort); + object_property_set_bool(o, "start-powered-off", true, + &error_abort); } qdev_realize(DEVICE(o), NULL, &error_abort); @@ -180,11 +180,10 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) /* * A7MPCORE */ - object_property_set_int(OBJECT(&s->a7mpcore), smp_cpus, "num-cpu", + object_property_set_int(OBJECT(&s->a7mpcore), "num-cpu", smp_cpus, &error_abort); - object_property_set_int(OBJECT(&s->a7mpcore), - FSL_IMX7_MAX_IRQ + GIC_INTERNAL, - "num-irq", &error_abort); + object_property_set_int(OBJECT(&s->a7mpcore), "num-irq", + FSL_IMX7_MAX_IRQ + GIC_INTERNAL, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->a7mpcore), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->a7mpcore), 0, FSL_IMX7_A7MPCORE_ADDR); @@ -364,8 +363,8 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) FSL_IMX7_ENET2_ADDR, }; - object_property_set_uint(OBJECT(&s->eth[i]), FSL_IMX7_ETH_NUM_TX_RINGS, - "tx-ring-num", &error_abort); + object_property_set_uint(OBJECT(&s->eth[i]), "tx-ring-num", + FSL_IMX7_ETH_NUM_TX_RINGS, &error_abort); qdev_set_nic_properties(DEVICE(&s->eth[i]), &nd_table[i]); sysbus_realize(SYS_BUS_DEVICE(&s->eth[i]), &error_abort); @@ -393,8 +392,8 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) FSL_IMX7_USDHC3_IRQ, }; - object_property_set_uint(OBJECT(&s->usdhc[i]), SDHCI_VENDOR_IMX, - "vendor", &error_abort); + object_property_set_uint(OBJECT(&s->usdhc[i]), "vendor", + SDHCI_VENDOR_IMX, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->usdhc[i]), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->usdhc[i]), 0, @@ -432,8 +431,8 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) FSL_IMX7_WDOG4_IRQ, }; - object_property_set_bool(OBJECT(&s->wdt[i]), true, "pretimeout-support", - &error_abort); + object_property_set_bool(OBJECT(&s->wdt[i]), "pretimeout-support", + true, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0, FSL_IMX7_WDOGn_ADDR[i]); diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index c7ef48ecde..c96f2ab9cf 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -267,18 +267,18 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id) cpuobj = object_new(machine->cpu_type); cpu = ARM_CPU(cpuobj); - object_property_set_int(cpuobj, QEMU_PSCI_CONDUIT_SMC, - "psci-conduit", &error_abort); + object_property_set_int(cpuobj, "psci-conduit", QEMU_PSCI_CONDUIT_SMC, + &error_abort); if (n) { /* Secondary CPUs start in PSCI powered-down state */ - object_property_set_bool(cpuobj, true, - "start-powered-off", &error_abort); + object_property_set_bool(cpuobj, "start-powered-off", true, + &error_abort); } if (object_property_find(cpuobj, "reset-cbar", NULL)) { - object_property_set_int(cpuobj, MPCORE_PERIPHBASE, - "reset-cbar", &error_abort); + object_property_set_int(cpuobj, "reset-cbar", MPCORE_PERIPHBASE, + &error_abort); } qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); cpu_irq[n] = qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ); diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index b11a846355..f304c2b4f0 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -604,7 +604,7 @@ static void integratorcp_init(MachineState *machine) * realization. */ if (object_property_find(cpuobj, "has_el3", NULL)) { - object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); + object_property_set_bool(cpuobj, "has_el3", false, &error_fatal); } qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c index 9033d3f8f3..ed69a7b037 100644 --- a/hw/arm/mcimx6ul-evk.c +++ b/hw/arm/mcimx6ul-evk.c @@ -40,8 +40,8 @@ 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_uint(OBJECT(s), 2, "fec1-phy-num", &error_fatal); - object_property_set_uint(OBJECT(s), 1, "fec2-phy-num", &error_fatal); + object_property_set_uint(OBJECT(s), "fec1-phy-num", 2, &error_fatal); + object_property_set_uint(OBJECT(s), "fec2-phy-num", 1, &error_fatal); qdev_realize(DEVICE(s), NULL, &error_fatal); memory_region_add_subregion(get_system_memory(), FSL_IMX6UL_MMDC_ADDR, diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c index 8fe42c9d6a..a91acab1cb 100644 --- a/hw/arm/microbit.c +++ b/hw/arm/microbit.c @@ -40,8 +40,8 @@ static void microbit_init(MachineState *machine) object_initialize_child(OBJECT(machine), "nrf51", &s->nrf51, TYPE_NRF51_SOC); qdev_prop_set_chr(DEVICE(&s->nrf51), "serial0", serial_hd(0)); - object_property_set_link(OBJECT(&s->nrf51), OBJECT(system_memory), - "memory", &error_fatal); + object_property_set_link(OBJECT(&s->nrf51), "memory", + OBJECT(system_memory), &error_fatal); sysbus_realize(SYS_BUS_DEVICE(&s->nrf51), &error_fatal); /* diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index a4fd5ddede..28d9e8bfac 100644 --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -265,8 +265,8 @@ static MemoryRegion *make_mpc(MPS2TZMachineState *mms, void *opaque, memory_region_init_ram(ssram, NULL, name, ramsize[i], &error_fatal); object_initialize_child(OBJECT(mms), mpcname, mpc, TYPE_TZ_MPC); - object_property_set_link(OBJECT(mpc), OBJECT(ssram), - "downstream", &error_fatal); + object_property_set_link(OBJECT(mpc), "downstream", OBJECT(ssram), + &error_fatal); sysbus_realize(SYS_BUS_DEVICE(mpc), &error_fatal); /* Map the upstream end of the MPC into system memory */ upstream = sysbus_mmio_get_region(SYS_BUS_DEVICE(mpc), 1); @@ -308,10 +308,9 @@ static MemoryRegion *make_dma(MPS2TZMachineState *mms, void *opaque, */ object_initialize_child(OBJECT(mms), mscname, msc, TYPE_TZ_MSC); msc_downstream = sysbus_mmio_get_region(SYS_BUS_DEVICE(&mms->iotkit), 0); - object_property_set_link(OBJECT(msc), OBJECT(msc_downstream), - "downstream", &error_fatal); - object_property_set_link(OBJECT(msc), OBJECT(mms), - "idau", &error_fatal); + object_property_set_link(OBJECT(msc), "downstream", + OBJECT(msc_downstream), &error_fatal); + object_property_set_link(OBJECT(msc), "idau", OBJECT(mms), &error_fatal); sysbus_realize(SYS_BUS_DEVICE(msc), &error_fatal); qdev_connect_gpio_out_named(DEVICE(msc), "irq", 0, @@ -330,8 +329,8 @@ static MemoryRegion *make_dma(MPS2TZMachineState *mms, void *opaque, msc_upstream = sysbus_mmio_get_region(SYS_BUS_DEVICE(msc), 0); object_initialize_child(OBJECT(mms), name, dma, TYPE_PL081); - object_property_set_link(OBJECT(dma), OBJECT(msc_upstream), - "downstream", &error_fatal); + object_property_set_link(OBJECT(dma), "downstream", OBJECT(msc_upstream), + &error_fatal); sysbus_realize(SYS_BUS_DEVICE(dma), &error_fatal); s = SYS_BUS_DEVICE(dma); @@ -404,8 +403,8 @@ static void mps2tz_common_init(MachineState *machine) object_initialize_child(OBJECT(machine), TYPE_IOTKIT, &mms->iotkit, mmc->armsse_type); iotkitdev = DEVICE(&mms->iotkit); - object_property_set_link(OBJECT(&mms->iotkit), OBJECT(system_memory), - "memory", &error_abort); + object_property_set_link(OBJECT(&mms->iotkit), "memory", + OBJECT(system_memory), &error_abort); qdev_prop_set_uint32(iotkitdev, "EXP_NUMIRQ", MPS2TZ_NUMIRQ); qdev_prop_set_uint32(iotkitdev, "MAINCLK", SYSCLK_FRQ); sysbus_realize(SYS_BUS_DEVICE(&mms->iotkit), &error_fatal); @@ -425,7 +424,7 @@ static void mps2tz_common_init(MachineState *machine) NULL); g_free(name); - object_property_set_int(OBJECT(splitter), 2, "num-lines", + object_property_set_int(OBJECT(splitter), "num-lines", 2, &error_fatal); qdev_realize(DEVICE(splitter), NULL, &error_fatal); qdev_connect_gpio_out(DEVICE(splitter), 0, @@ -442,9 +441,9 @@ static void mps2tz_common_init(MachineState *machine) */ object_initialize_child(OBJECT(machine), "sec-resp-splitter", &mms->sec_resp_splitter, TYPE_SPLIT_IRQ); - object_property_set_int(OBJECT(&mms->sec_resp_splitter), + object_property_set_int(OBJECT(&mms->sec_resp_splitter), "num-lines", ARRAY_SIZE(mms->ppc) + ARRAY_SIZE(mms->msc), - "num-lines", &error_fatal); + &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, @@ -475,7 +474,7 @@ static void mps2tz_common_init(MachineState *machine) */ object_initialize_child(OBJECT(mms), "uart-irq-orgate", &mms->uart_irq_orgate, TYPE_OR_IRQ); - object_property_set_int(OBJECT(&mms->uart_irq_orgate), 10, "num-lines", + object_property_set_int(OBJECT(&mms->uart_irq_orgate), "num-lines", 10, &error_fatal); qdev_realize(DEVICE(&mms->uart_irq_orgate), NULL, &error_fatal); qdev_connect_gpio_out(DEVICE(&mms->uart_irq_orgate), 0, @@ -568,8 +567,8 @@ static void mps2tz_common_init(MachineState *machine) mr = pinfo->devfn(mms, pinfo->opaque, pinfo->name, pinfo->size); portname = g_strdup_printf("port[%d]", port); - object_property_set_link(OBJECT(ppc), OBJECT(mr), - portname, &error_fatal); + object_property_set_link(OBJECT(ppc), portname, OBJECT(mr), + &error_fatal); g_free(portname); } diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index d1653a7e6e..9f12934ca8 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -203,8 +203,8 @@ static void mps2_common_init(MachineState *machine) } qdev_prop_set_string(armv7m, "cpu-type", machine->cpu_type); qdev_prop_set_bit(armv7m, "enable-bitband", true); - object_property_set_link(OBJECT(&mms->armv7m), OBJECT(system_memory), - "memory", &error_abort); + object_property_set_link(OBJECT(&mms->armv7m), "memory", + OBJECT(system_memory), &error_abort); sysbus_realize(SYS_BUS_DEVICE(&mms->armv7m), &error_fatal); create_unimplemented_device("zbtsmram mirror", 0x00400000, 0x00400000); @@ -237,7 +237,7 @@ static void mps2_common_init(MachineState *machine) DeviceState *orgate_dev; orgate = object_new(TYPE_OR_IRQ); - object_property_set_int(orgate, 6, "num-lines", &error_fatal); + object_property_set_int(orgate, "num-lines", 6, &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)); @@ -273,7 +273,7 @@ static void mps2_common_init(MachineState *machine) DeviceState *orgate_dev; orgate = object_new(TYPE_OR_IRQ); - object_property_set_int(orgate, 10, "num-lines", &error_fatal); + object_property_set_int(orgate, "num-lines", 10, &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)); @@ -288,7 +288,7 @@ static void mps2_common_init(MachineState *machine) DeviceState *txrx_orgate_dev; txrx_orgate = object_new(TYPE_OR_IRQ); - object_property_set_int(txrx_orgate, 2, "num-lines", &error_fatal); + object_property_set_int(txrx_orgate, "num-lines", 2, &error_fatal); qdev_realize(DEVICE(txrx_orgate), NULL, &error_fatal); txrx_orgate_dev = DEVICE(txrx_orgate); qdev_connect_gpio_out(txrx_orgate_dev, 0, @@ -356,7 +356,7 @@ static void mps2_common_init(MachineState *machine) int j; orgate = object_new(TYPE_OR_IRQ); - object_property_set_int(orgate, 2, "num-lines", &error_fatal); + object_property_set_int(orgate, "num-lines", 2, &error_fatal); orgate_dev = DEVICE(orgate); qdev_realize(orgate_dev, NULL, &error_fatal); qdev_connect_gpio_out(orgate_dev, 0, diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index 476112b2d9..e6e4bb3153 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -123,8 +123,8 @@ static void m2sxxx_soc_realize(DeviceState *dev_soc, Error **errp) qdev_prop_set_uint32(armv7m, "num-irq", 81); qdev_prop_set_string(armv7m, "cpu-type", s->cpu_type); qdev_prop_set_bit(armv7m, "enable-bitband", true); - object_property_set_link(OBJECT(&s->armv7m), OBJECT(get_system_memory()), - "memory", &error_abort); + object_property_set_link(OBJECT(&s->armv7m), "memory", + OBJECT(get_system_memory()), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->armv7m), &err)) { error_propagate(errp, err); return; @@ -193,8 +193,8 @@ static void m2sxxx_soc_realize(DeviceState *dev_soc, Error **errp) } dev = DEVICE(&s->emac); - object_property_set_link(OBJECT(&s->emac), OBJECT(get_system_memory()), - "ahb-bus", &error_abort); + object_property_set_link(OBJECT(&s->emac), "ahb-bus", + OBJECT(get_system_memory()), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->emac), &err)) { error_propagate(errp, err); return; diff --git a/hw/arm/musca.c b/hw/arm/musca.c index 34376328fc..4bc737f93b 100644 --- a/hw/arm/musca.c +++ b/hw/arm/musca.c @@ -256,8 +256,8 @@ static MemoryRegion *make_mpc(MuscaMachineState *mms, void *opaque, } object_initialize_child(OBJECT(mms), mpcname, mpc, TYPE_TZ_MPC); - object_property_set_link(OBJECT(mpc), OBJECT(downstream), - "downstream", &error_fatal); + object_property_set_link(OBJECT(mpc), "downstream", OBJECT(downstream), + &error_fatal); sysbus_realize(SYS_BUS_DEVICE(mpc), &error_fatal); /* Map the upstream end of the MPC into system memory */ upstream = sysbus_mmio_get_region(SYS_BUS_DEVICE(mpc), 1); @@ -374,8 +374,8 @@ static void musca_init(MachineState *machine) object_initialize_child(OBJECT(machine), "sse-200", &mms->sse, TYPE_SSE200); ssedev = DEVICE(&mms->sse); - object_property_set_link(OBJECT(&mms->sse), OBJECT(system_memory), - "memory", &error_fatal); + object_property_set_link(OBJECT(&mms->sse), "memory", + OBJECT(system_memory), &error_fatal); qdev_prop_set_uint32(ssedev, "EXP_NUMIRQ", mmc->num_irqs); qdev_prop_set_uint32(ssedev, "init-svtor", mmc->init_svtor); qdev_prop_set_uint32(ssedev, "SRAM_ADDR_WIDTH", mmc->sram_addr_width); @@ -403,7 +403,7 @@ static void musca_init(MachineState *machine) &error_fatal, NULL); g_free(name); - object_property_set_int(OBJECT(splitter), 2, "num-lines", + object_property_set_int(OBJECT(splitter), "num-lines", 2, &error_fatal); qdev_realize(DEVICE(splitter), NULL, &error_fatal); qdev_connect_gpio_out(DEVICE(splitter), 0, @@ -422,8 +422,8 @@ static void musca_init(MachineState *machine) sizeof(mms->sec_resp_splitter), TYPE_SPLIT_IRQ, &error_fatal, NULL); - object_property_set_int(OBJECT(&mms->sec_resp_splitter), - ARRAY_SIZE(mms->ppc), "num-lines", &error_fatal); + object_property_set_int(OBJECT(&mms->sec_resp_splitter), "num-lines", + ARRAY_SIZE(mms->ppc), &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, @@ -541,8 +541,8 @@ static void musca_init(MachineState *machine) mr = pinfo->devfn(mms, pinfo->opaque, pinfo->name, pinfo->size); portname = g_strdup_printf("port[%d]", port); - object_property_set_link(OBJECT(ppc), OBJECT(mr), - portname, &error_fatal); + object_property_set_link(OBJECT(ppc), portname, OBJECT(mr), + &error_fatal); g_free(portname); } diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 394a3345bd..ff9a7c8cc6 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1690,8 +1690,8 @@ static void musicpal_init(MachineState *machine) wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR); dev = qdev_new(TYPE_MV88W8618_AUDIO); s = SYS_BUS_DEVICE(dev); - object_property_set_link(OBJECT(dev), OBJECT(wm8750_dev), - "wm8750", NULL); + object_property_set_link(OBJECT(dev), "wm8750", OBJECT(wm8750_dev), + NULL); sysbus_realize_and_unref(s, &error_fatal); sysbus_mmio_map(s, 0, MP_AUDIO_BASE); sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]); diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c index e9c77e4c21..c440cd11e9 100644 --- a/hw/arm/nrf51_soc.c +++ b/hw/arm/nrf51_soc.c @@ -65,7 +65,7 @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error **errp) return; } - object_property_set_link(OBJECT(&s->cpu), OBJECT(&s->container), "memory", + object_property_set_link(OBJECT(&s->cpu), "memory", OBJECT(&s->container), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->cpu), &err)) { error_propagate(errp, err); @@ -106,7 +106,7 @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error **errp) BASE_TO_IRQ(NRF51_RNG_BASE))); /* UICR, FICR, NVMC, FLASH */ - object_property_set_uint(OBJECT(&s->nvm), s->flash_size, "flash-size", + object_property_set_uint(OBJECT(&s->nvm), "flash-size", s->flash_size, &err); if (err) { error_propagate(errp, err); @@ -141,7 +141,7 @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error **errp) /* TIMER */ for (i = 0; i < NRF51_NUM_TIMERS; i++) { - object_property_set_uint(OBJECT(&s->timer[i]), i, "id", &err); + object_property_set_uint(OBJECT(&s->timer[i]), "id", i, &err); if (err) { error_propagate(errp, err); return; diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c index 843dcbbd62..1679468232 100644 --- a/hw/arm/orangepi.c +++ b/hw/arm/orangepi.c @@ -63,9 +63,8 @@ static void orangepi_init(MachineState *machine) object_unref(OBJECT(h3)); /* Setup timer properties */ - object_property_set_int(OBJECT(h3), 32768, "clk0-freq", - &error_abort); - object_property_set_int(OBJECT(h3), 24 * 1000 * 1000, "clk1-freq", + object_property_set_int(OBJECT(h3), "clk0-freq", 32768, &error_abort); + object_property_set_int(OBJECT(h3), "clk1-freq", 24 * 1000 * 1000, &error_abort); /* Setup SID properties. Currently using a default fixed SID identifier. */ @@ -77,12 +76,12 @@ static void orangepi_init(MachineState *machine) } /* Setup EMAC properties */ - object_property_set_int(OBJECT(&h3->emac), 1, "phy-addr", &error_abort); + object_property_set_int(OBJECT(&h3->emac), "phy-addr", 1, &error_abort); /* DRAMC */ - object_property_set_uint(OBJECT(h3), h3->memmap[AW_H3_SDRAM], - "ram-addr", &error_abort); - object_property_set_int(OBJECT(h3), machine->ram_size / MiB, "ram-size", + object_property_set_uint(OBJECT(h3), "ram-addr", h3->memmap[AW_H3_SDRAM], + &error_abort); + object_property_set_int(OBJECT(h3), "ram-size", machine->ram_size / MiB, &error_abort); /* Mark H3 object realized */ diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 09bf02ec9c..b2d6c9688f 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -285,7 +285,7 @@ static void raspi_machine_init(MachineState *machine) object_initialize_child(OBJECT(machine), "soc", &s->soc, board_soc_type(board_rev)); object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(machine->ram)); - object_property_set_int(OBJECT(&s->soc), board_rev, "board-rev", + object_property_set_int(OBJECT(&s->soc), "board-rev", board_rev, &error_abort); qdev_realize(DEVICE(&s->soc), NULL, &error_abort); diff --git a/hw/arm/realview.c b/hw/arm/realview.c index b6c0a1adb9..22e132058e 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -107,11 +107,11 @@ static void realview_init(MachineState *machine, * before realization. */ if (object_property_find(cpuobj, "has_el3", NULL)) { - object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); + object_property_set_bool(cpuobj, "has_el3", false, &error_fatal); } if (is_pb && is_mpcore) { - object_property_set_int(cpuobj, periphbase, "reset-cbar", + object_property_set_int(cpuobj, "reset-cbar", periphbase, &error_fatal); } @@ -205,7 +205,7 @@ static void realview_init(MachineState *machine, /* DMA controller is optional, apparently. */ dev = qdev_new("pl081"); - object_property_set_link(OBJECT(dev), OBJECT(sysmem), "downstream", + object_property_set_link(OBJECT(dev), "downstream", OBJECT(sysmem), &error_fatal); busdev = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(busdev, &error_fatal); diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index e40c868a82..f030a416fd 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -499,7 +499,7 @@ static void create_smmu(const SBSAMachineState *sms, PCIBus *bus) dev = qdev_new("arm-smmuv3"); - object_property_set_link(OBJECT(dev), OBJECT(bus), "primary-bus", + object_property_set_link(OBJECT(dev), "primary-bus", OBJECT(bus), &error_abort); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); @@ -659,8 +659,8 @@ static void sbsa_ref_init(MachineState *machine) } cpuobj = object_new(possible_cpus->cpus[n].type); - object_property_set_int(cpuobj, possible_cpus->cpus[n].arch_id, - "mp-affinity", NULL); + object_property_set_int(cpuobj, "mp-affinity", + possible_cpus->cpus[n].arch_id, NULL); cs = CPU(cpuobj); cs->cpu_index = n; @@ -669,16 +669,16 @@ static void sbsa_ref_init(MachineState *machine) &error_fatal); if (object_property_find(cpuobj, "reset-cbar", NULL)) { - object_property_set_int(cpuobj, + object_property_set_int(cpuobj, "reset-cbar", sbsa_ref_memmap[SBSA_CPUPERIPHS].base, - "reset-cbar", &error_abort); + &error_abort); } - object_property_set_link(cpuobj, OBJECT(sysmem), "memory", + object_property_set_link(cpuobj, "memory", OBJECT(sysmem), &error_abort); - object_property_set_link(cpuobj, OBJECT(secure_sysmem), - "secure-memory", &error_abort); + object_property_set_link(cpuobj, "secure-memory", + OBJECT(secure_sysmem), &error_abort); qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); object_unref(cpuobj); diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 97ef566c12..7156fb3ece 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -1312,8 +1312,8 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) qdev_prop_set_uint32(nvic, "num-irq", NUM_IRQ_LINES); qdev_prop_set_string(nvic, "cpu-type", ms->cpu_type); qdev_prop_set_bit(nvic, "enable-bitband", true); - object_property_set_link(OBJECT(nvic), OBJECT(get_system_memory()), - "memory", &error_abort); + object_property_set_link(OBJECT(nvic), "memory", + OBJECT(get_system_memory()), &error_abort); /* This will exit with an error if the user passed us a bad cpu_type */ sysbus_realize_and_unref(SYS_BUS_DEVICE(nvic), &error_fatal); diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index 46b5332470..9acf401fbf 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -105,8 +105,8 @@ static void stm32f205_soc_realize(DeviceState *dev_soc, Error **errp) qdev_prop_set_uint32(armv7m, "num-irq", 96); qdev_prop_set_string(armv7m, "cpu-type", s->cpu_type); qdev_prop_set_bit(armv7m, "enable-bitband", true); - object_property_set_link(OBJECT(&s->armv7m), OBJECT(get_system_memory()), - "memory", &error_abort); + object_property_set_link(OBJECT(&s->armv7m), "memory", + OBJECT(get_system_memory()), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->armv7m), &err)) { error_propagate(errp, err); return; @@ -149,8 +149,8 @@ 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", &error_abort); + object_property_set_int(OBJECT(s->adc_irqs), "num-lines", STM_NUM_ADCS, + &error_abort); if (!qdev_realize(DEVICE(s->adc_irqs), NULL, &err)) { error_propagate(errp, err); return; diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c index f1f0dc40b1..07ce323a64 100644 --- a/hw/arm/stm32f405_soc.c +++ b/hw/arm/stm32f405_soc.c @@ -116,8 +116,8 @@ static void stm32f405_soc_realize(DeviceState *dev_soc, Error **errp) qdev_prop_set_uint32(armv7m, "num-irq", 96); qdev_prop_set_string(armv7m, "cpu-type", s->cpu_type); qdev_prop_set_bit(armv7m, "enable-bitband", true); - object_property_set_link(OBJECT(&s->armv7m), OBJECT(system_memory), - "memory", &error_abort); + object_property_set_link(OBJECT(&s->armv7m), "memory", + OBJECT(system_memory), &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->armv7m), &err)) { error_propagate(errp, err); return; @@ -167,8 +167,8 @@ static void stm32f405_soc_realize(DeviceState *dev_soc, Error **errp) error_propagate(errp, err); return; } - object_property_set_int(OBJECT(&s->adc_irqs), STM_NUM_ADCS, - "num-lines", &error_abort); + object_property_set_int(OBJECT(&s->adc_irqs), "num-lines", STM_NUM_ADCS, + &error_abort); if (!qdev_realize(DEVICE(&s->adc_irqs), NULL, &err)) { error_propagate(errp, err); return; diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index e596b8170f..d09ea24ae2 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -213,7 +213,7 @@ static void versatile_init(MachineState *machine, int board_id) * realization. */ if (object_property_find(cpuobj, "has_el3", NULL)) { - object_property_set_bool(cpuobj, false, "has_el3", &error_fatal); + object_property_set_bool(cpuobj, "has_el3", false, &error_fatal); } qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); @@ -288,7 +288,7 @@ static void versatile_init(MachineState *machine, int board_id) pl011_create(0x10009000, sic[6], serial_hd(3)); dev = qdev_new("pl080"); - object_property_set_link(OBJECT(dev), OBJECT(sysmem), "downstream", + object_property_set_link(OBJECT(dev), "downstream", OBJECT(sysmem), &error_fatal); busdev = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(busdev, &error_fatal); diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 5bf9cff8a8..762b068e90 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -218,17 +218,17 @@ static void init_cpus(MachineState *ms, const char *cpu_type, Object *cpuobj = object_new(cpu_type); if (!secure) { - object_property_set_bool(cpuobj, false, "has_el3", NULL); + object_property_set_bool(cpuobj, "has_el3", false, NULL); } if (!virt) { if (object_property_find(cpuobj, "has_el2", NULL)) { - object_property_set_bool(cpuobj, false, "has_el2", NULL); + object_property_set_bool(cpuobj, "has_el2", false, NULL); } } if (object_property_find(cpuobj, "reset-cbar", NULL)) { - object_property_set_int(cpuobj, periphbase, - "reset-cbar", &error_abort); + object_property_set_int(cpuobj, "reset-cbar", periphbase, + &error_abort); } qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); } diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 7d9f7157da..9005dae356 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -594,7 +594,7 @@ static void create_its(VirtMachineState *vms) dev = qdev_new(itsclass); - object_property_set_link(OBJECT(dev), OBJECT(vms->gic), "parent-gicv3", + object_property_set_link(OBJECT(dev), "parent-gicv3", OBJECT(vms->gic), &error_abort); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, vms->memmap[VIRT_GIC_ITS].base); @@ -1175,7 +1175,7 @@ static void create_smmu(const VirtMachineState *vms, dev = qdev_new("arm-smmuv3"); - object_property_set_link(OBJECT(dev), OBJECT(bus), "primary-bus", + object_property_set_link(OBJECT(dev), "primary-bus", OBJECT(bus), &error_abort); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); @@ -1785,8 +1785,8 @@ static void machvirt_init(MachineState *machine) } cpuobj = object_new(possible_cpus->cpus[n].type); - object_property_set_int(cpuobj, possible_cpus->cpus[n].arch_id, - "mp-affinity", NULL); + object_property_set_int(cpuobj, "mp-affinity", + possible_cpus->cpus[n].arch_id, NULL); cs = CPU(cpuobj); cs->cpu_index = n; @@ -1797,43 +1797,44 @@ static void machvirt_init(MachineState *machine) aarch64 &= object_property_get_bool(cpuobj, "aarch64", NULL); if (!vms->secure) { - object_property_set_bool(cpuobj, false, "has_el3", NULL); + object_property_set_bool(cpuobj, "has_el3", false, NULL); } if (!vms->virt && object_property_find(cpuobj, "has_el2", NULL)) { - object_property_set_bool(cpuobj, false, "has_el2", NULL); + object_property_set_bool(cpuobj, "has_el2", false, NULL); } if (vms->psci_conduit != QEMU_PSCI_CONDUIT_DISABLED) { - object_property_set_int(cpuobj, vms->psci_conduit, - "psci-conduit", NULL); + object_property_set_int(cpuobj, "psci-conduit", vms->psci_conduit, + NULL); /* Secondary CPUs start in PSCI powered-down state */ if (n > 0) { - object_property_set_bool(cpuobj, true, - "start-powered-off", NULL); + object_property_set_bool(cpuobj, "start-powered-off", true, + NULL); } } if (vmc->kvm_no_adjvtime && object_property_find(cpuobj, "kvm-no-adjvtime", NULL)) { - object_property_set_bool(cpuobj, true, "kvm-no-adjvtime", NULL); + object_property_set_bool(cpuobj, "kvm-no-adjvtime", true, NULL); } if (vmc->no_pmu && object_property_find(cpuobj, "pmu", NULL)) { - object_property_set_bool(cpuobj, false, "pmu", NULL); + object_property_set_bool(cpuobj, "pmu", false, NULL); } if (object_property_find(cpuobj, "reset-cbar", NULL)) { - object_property_set_int(cpuobj, vms->memmap[VIRT_CPUPERIPHS].base, - "reset-cbar", &error_abort); + object_property_set_int(cpuobj, "reset-cbar", + vms->memmap[VIRT_CPUPERIPHS].base, + &error_abort); } - object_property_set_link(cpuobj, OBJECT(sysmem), "memory", + object_property_set_link(cpuobj, "memory", OBJECT(sysmem), &error_abort); if (vms->secure) { - object_property_set_link(cpuobj, OBJECT(secure_sysmem), - "secure-memory", &error_abort); + object_property_set_link(cpuobj, "secure-memory", + OBJECT(secure_sysmem), &error_abort); } /* @@ -1857,11 +1858,12 @@ static void machvirt_init(MachineState *machine) } } - object_property_set_link(cpuobj, OBJECT(tag_sysmem), - "tag-memory", &error_abort); + object_property_set_link(cpuobj, "tag-memory", OBJECT(tag_sysmem), + &error_abort); if (vms->secure) { - object_property_set_link(cpuobj, OBJECT(secure_tag_sysmem), - "secure-tag-memory", &error_abort); + object_property_set_link(cpuobj, "secure-tag-memory", + OBJECT(secure_tag_sysmem), + &error_abort); } } diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index ed970273f3..32aa7323d9 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -196,12 +196,12 @@ static void zynq_init(MachineState *machine) * realization. */ if (object_property_find(OBJECT(cpu), "has_el3", NULL)) { - object_property_set_bool(OBJECT(cpu), false, "has_el3", &error_fatal); + object_property_set_bool(OBJECT(cpu), "has_el3", false, &error_fatal); } - object_property_set_int(OBJECT(cpu), ZYNQ_BOARD_MIDR, "midr", + object_property_set_int(OBJECT(cpu), "midr", ZYNQ_BOARD_MIDR, &error_fatal); - object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar", + object_property_set_int(OBJECT(cpu), "reset-cbar", MPCORE_PERIPHBASE, &error_fatal); qdev_realize(DEVICE(cpu), NULL, &error_fatal); diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index a3b1ce9c7c..4b3152ee77 100644 --- a/hw/arm/xlnx-versal-virt.c +++ b/hw/arm/xlnx-versal-virt.c @@ -502,10 +502,10 @@ static void versal_virt_init(MachineState *machine) object_initialize_child(OBJECT(machine), "xlnx-versal", &s->soc, TYPE_XLNX_VERSAL); - object_property_set_link(OBJECT(&s->soc), OBJECT(machine->ram), - "ddr", &error_abort); - object_property_set_int(OBJECT(&s->soc), psci_conduit, - "psci-conduit", &error_abort); + object_property_set_link(OBJECT(&s->soc), "ddr", OBJECT(machine->ram), + &error_abort); + object_property_set_int(OBJECT(&s->soc), "psci-conduit", psci_conduit, + &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->soc), &error_fatal); fdt_create(s); diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index fed9d07ca2..ead038b971 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -35,17 +35,17 @@ static void versal_create_apu_cpus(Versal *s) object_initialize_child(OBJECT(s), "apu-cpu[*]", &s->fpd.apu.cpu[i], XLNX_VERSAL_ACPU_TYPE); obj = OBJECT(&s->fpd.apu.cpu[i]); - object_property_set_int(obj, s->cfg.psci_conduit, - "psci-conduit", &error_abort); + object_property_set_int(obj, "psci-conduit", s->cfg.psci_conduit, + &error_abort); if (i) { /* Secondary CPUs start in PSCI powered-down state */ - object_property_set_bool(obj, true, - "start-powered-off", &error_abort); + object_property_set_bool(obj, "start-powered-off", true, + &error_abort); } - object_property_set_int(obj, ARRAY_SIZE(s->fpd.apu.cpu), - "core-count", &error_abort); - object_property_set_link(obj, OBJECT(&s->fpd.apu.mr), "memory", + object_property_set_int(obj, "core-count", ARRAY_SIZE(s->fpd.apu.cpu), + &error_abort); + object_property_set_link(obj, "memory", OBJECT(&s->fpd.apu.mr), &error_abort); qdev_realize(DEVICE(obj), NULL, &error_fatal); } @@ -164,11 +164,9 @@ static void versal_create_gems(Versal *s, qemu_irq *pic) qemu_check_nic_model(nd, "cadence_gem"); qdev_set_nic_properties(dev, nd); } - object_property_set_int(OBJECT(dev), - 2, "num-priority-queues", + object_property_set_int(OBJECT(dev), "num-priority-queues", 2, &error_abort); - object_property_set_link(OBJECT(dev), - OBJECT(&s->mr_ps), "dma", + object_property_set_link(OBJECT(dev), "dma", OBJECT(&s->mr_ps), &error_abort); sysbus_realize(SYS_BUS_DEVICE(dev), &error_fatal); @@ -192,7 +190,7 @@ static void versal_create_admas(Versal *s, qemu_irq *pic) object_initialize_child(OBJECT(s), name, &s->lpd.iou.adma[i], TYPE_XLNX_ZDMA); dev = DEVICE(&s->lpd.iou.adma[i]); - object_property_set_int(OBJECT(dev), 128, "bus-width", &error_abort); + object_property_set_int(OBJECT(dev), "bus-width", 128, &error_abort); sysbus_realize(SYS_BUS_DEVICE(dev), &error_fatal); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0); @@ -217,11 +215,11 @@ static void versal_create_sds(Versal *s, qemu_irq *pic) TYPE_SYSBUS_SDHCI); dev = DEVICE(&s->pmc.iou.sd[i]); - object_property_set_uint(OBJECT(dev), - 3, "sd-spec-version", &error_fatal); - object_property_set_uint(OBJECT(dev), SDHCI_CAPABILITIES, "capareg", + object_property_set_uint(OBJECT(dev), "sd-spec-version", 3, + &error_fatal); + object_property_set_uint(OBJECT(dev), "capareg", SDHCI_CAPABILITIES, &error_fatal); - object_property_set_uint(OBJECT(dev), UHS_I, "uhs", &error_fatal); + object_property_set_uint(OBJECT(dev), "uhs", UHS_I, &error_fatal); sysbus_realize(SYS_BUS_DEVICE(dev), &error_fatal); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0); diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index 77449759c6..5997262459 100644 --- a/hw/arm/xlnx-zcu102.c +++ b/hw/arm/xlnx-zcu102.c @@ -118,11 +118,11 @@ static void xlnx_zcu102_init(MachineState *machine) object_initialize_child(OBJECT(machine), "soc", &s->soc, TYPE_XLNX_ZYNQMP); - object_property_set_link(OBJECT(&s->soc), OBJECT(machine->ram), - "ddr-ram", &error_abort); - object_property_set_bool(OBJECT(&s->soc), s->secure, "secure", + object_property_set_link(OBJECT(&s->soc), "ddr-ram", OBJECT(machine->ram), + &error_abort); + object_property_set_bool(OBJECT(&s->soc), "secure", s->secure, &error_fatal); - object_property_set_bool(OBJECT(&s->soc), s->virt, "virtualization", + object_property_set_bool(OBJECT(&s->soc), "virtualization", s->virt, &error_fatal); qdev_realize(DEVICE(&s->soc), NULL, &error_fatal); diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index d703158f8b..e7fe85f1d8 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -200,14 +200,14 @@ static void xlnx_zynqmp_create_rpu(MachineState *ms, XlnxZynqMPState *s, name = object_get_canonical_path_component(OBJECT(&s->rpu_cpu[i])); if (strcmp(name, boot_cpu)) { /* Secondary CPUs start in PSCI powered-down state */ - object_property_set_bool(OBJECT(&s->rpu_cpu[i]), true, - "start-powered-off", &error_abort); + object_property_set_bool(OBJECT(&s->rpu_cpu[i]), + "start-powered-off", true, &error_abort); } else { s->boot_cpu_ptr = &s->rpu_cpu[i]; } g_free(name); - object_property_set_bool(OBJECT(&s->rpu_cpu[i]), true, "reset-hivecs", + object_property_set_bool(OBJECT(&s->rpu_cpu[i]), "reset-hivecs", true, &error_abort); if (!qdev_realize(DEVICE(&s->rpu_cpu[i]), NULL, &err)) { error_propagate(errp, err); @@ -345,27 +345,27 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) for (i = 0; i < num_apus; i++) { char *name; - object_property_set_int(OBJECT(&s->apu_cpu[i]), QEMU_PSCI_CONDUIT_SMC, - "psci-conduit", &error_abort); + object_property_set_int(OBJECT(&s->apu_cpu[i]), "psci-conduit", + QEMU_PSCI_CONDUIT_SMC, &error_abort); name = object_get_canonical_path_component(OBJECT(&s->apu_cpu[i])); if (strcmp(name, boot_cpu)) { /* Secondary CPUs start in PSCI powered-down state */ - object_property_set_bool(OBJECT(&s->apu_cpu[i]), true, - "start-powered-off", &error_abort); + object_property_set_bool(OBJECT(&s->apu_cpu[i]), + "start-powered-off", true, &error_abort); } else { s->boot_cpu_ptr = &s->apu_cpu[i]; } g_free(name); - object_property_set_bool(OBJECT(&s->apu_cpu[i]), - s->secure, "has_el3", NULL); - object_property_set_bool(OBJECT(&s->apu_cpu[i]), - s->virt, "has_el2", NULL); - object_property_set_int(OBJECT(&s->apu_cpu[i]), GIC_BASE_ADDR, - "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]), "has_el3", s->secure, + NULL); + object_property_set_bool(OBJECT(&s->apu_cpu[i]), "has_el2", s->virt, + NULL); + object_property_set_int(OBJECT(&s->apu_cpu[i]), "reset-cbar", + GIC_BASE_ADDR, &error_abort); + object_property_set_int(OBJECT(&s->apu_cpu[i]), "core-count", + num_apus, &error_abort); if (!qdev_realize(DEVICE(&s->apu_cpu[i]), NULL, &err)) { error_propagate(errp, err); return; @@ -463,9 +463,9 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) qemu_check_nic_model(nd, TYPE_CADENCE_GEM); qdev_set_nic_properties(DEVICE(&s->gem[i]), nd); } - object_property_set_int(OBJECT(&s->gem[i]), GEM_REVISION, "revision", + object_property_set_int(OBJECT(&s->gem[i]), "revision", GEM_REVISION, &error_abort); - object_property_set_int(OBJECT(&s->gem[i]), 2, "num-priority-queues", + object_property_set_int(OBJECT(&s->gem[i]), "num-priority-queues", 2, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->gem[i]), &err)) { error_propagate(errp, err); @@ -487,7 +487,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) gic_spi[uart_intr[i]]); } - object_property_set_int(OBJECT(&s->sata), SATA_NUM_PORTS, "num-ports", + object_property_set_int(OBJECT(&s->sata), "num-ports", SATA_NUM_PORTS, &error_abort); if (!sysbus_realize(SYS_BUS_DEVICE(&s->sata), &err)) { error_propagate(errp, err); @@ -507,17 +507,17 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) * - SDIO Specification Version 3.0 * - eMMC Specification Version 4.51 */ - object_property_set_uint(sdhci, 3, "sd-spec-version", &err); + object_property_set_uint(sdhci, "sd-spec-version", 3, &err); if (err) { error_propagate(errp, err); return; } - object_property_set_uint(sdhci, SDHCI_CAPABILITIES, "capareg", &err); + object_property_set_uint(sdhci, "capareg", SDHCI_CAPABILITIES, &err); if (err) { error_propagate(errp, err); return; } - object_property_set_uint(sdhci, UHS_I, "uhs", &err); + object_property_set_uint(sdhci, "uhs", UHS_I, &err); if (err) { error_propagate(errp, err); return; @@ -586,7 +586,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) error_propagate(errp, err); return; } - object_property_set_link(OBJECT(&s->dp), OBJECT(&s->dpdma), "dpdma", + object_property_set_link(OBJECT(&s->dp), "dpdma", OBJECT(&s->dpdma), &error_abort); sysbus_mmio_map(SYS_BUS_DEVICE(&s->dpdma), 0, DPDMA_ADDR); sysbus_connect_irq(SYS_BUS_DEVICE(&s->dpdma), 0, gic_spi[DPDMA_IRQ]); @@ -606,7 +606,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->rtc), 0, gic_spi[RTC_IRQ]); for (i = 0; i < XLNX_ZYNQMP_NUM_GDMA_CH; i++) { - object_property_set_uint(OBJECT(&s->gdma[i]), 128, "bus-width", &err); + object_property_set_uint(OBJECT(&s->gdma[i]), "bus-width", 128, &err); if (err) { error_propagate(errp, err); return; |