hw/arm/msf2-som.c | 1 + hw/arm/netduino2.c | 1 + hw/arm/netduinoplus2.c | 1 + hw/arm/olimex-stm32-h405.c | 1 + hw/arm/stm32vldiscovery.c | 1 + 5 files changed, 5 insertions(+)
QDev objects created with qdev_new() need to manually add
their parent relationship with object_property_add_child().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/arm/msf2-som.c | 1 +
hw/arm/netduino2.c | 1 +
hw/arm/netduinoplus2.c | 1 +
hw/arm/olimex-stm32-h405.c | 1 +
hw/arm/stm32vldiscovery.c | 1 +
5 files changed, 5 insertions(+)
diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
index 7b3106c790..e93c83c410 100644
--- a/hw/arm/msf2-som.c
+++ b/hw/arm/msf2-som.c
@@ -66,6 +66,7 @@ static void emcraft_sf2_s2s010_init(MachineState *machine)
memory_region_add_subregion(sysmem, DDR_BASE_ADDRESS, ddr);
dev = qdev_new(TYPE_MSF2_SOC);
+ object_property_add_child(OBJECT(machine), "soc", OBJECT(dev));
qdev_prop_set_string(dev, "part-name", "M2S010");
qdev_prop_set_string(dev, "cpu-type", mc->default_cpu_type);
diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c
index 501f63a77f..8b1a9a2437 100644
--- a/hw/arm/netduino2.c
+++ b/hw/arm/netduino2.c
@@ -44,6 +44,7 @@ static void netduino2_init(MachineState *machine)
clock_set_hz(sysclk, SYSCLK_FRQ);
dev = qdev_new(TYPE_STM32F205_SOC);
+ object_property_add_child(OBJECT(machine), "soc", OBJECT(dev));
qdev_connect_clock_in(dev, "sysclk", sysclk);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
diff --git a/hw/arm/netduinoplus2.c b/hw/arm/netduinoplus2.c
index 2e58984947..bccd100354 100644
--- a/hw/arm/netduinoplus2.c
+++ b/hw/arm/netduinoplus2.c
@@ -44,6 +44,7 @@ static void netduinoplus2_init(MachineState *machine)
clock_set_hz(sysclk, SYSCLK_FRQ);
dev = qdev_new(TYPE_STM32F405_SOC);
+ object_property_add_child(OBJECT(machine), "soc", OBJECT(dev));
qdev_connect_clock_in(dev, "sysclk", sysclk);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
diff --git a/hw/arm/olimex-stm32-h405.c b/hw/arm/olimex-stm32-h405.c
index d793de7c97..4ad7b043be 100644
--- a/hw/arm/olimex-stm32-h405.c
+++ b/hw/arm/olimex-stm32-h405.c
@@ -47,6 +47,7 @@ static void olimex_stm32_h405_init(MachineState *machine)
clock_set_hz(sysclk, SYSCLK_FRQ);
dev = qdev_new(TYPE_STM32F405_SOC);
+ object_property_add_child(OBJECT(machine), "soc", OBJECT(dev));
qdev_connect_clock_in(dev, "sysclk", sysclk);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
diff --git a/hw/arm/stm32vldiscovery.c b/hw/arm/stm32vldiscovery.c
index 190db6118b..cc41935160 100644
--- a/hw/arm/stm32vldiscovery.c
+++ b/hw/arm/stm32vldiscovery.c
@@ -47,6 +47,7 @@ static void stm32vldiscovery_init(MachineState *machine)
clock_set_hz(sysclk, SYSCLK_FRQ);
dev = qdev_new(TYPE_STM32F100_SOC);
+ object_property_add_child(OBJECT(machine), "soc", OBJECT(dev));
qdev_connect_clock_in(dev, "sysclk", sysclk);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
--
2.41.0
On Thu, 4 Jan 2024 at 14:12, Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > QDev objects created with qdev_new() need to manually add > their parent relationship with object_property_add_child(). > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Applied to target-arm.next, thanks. -- PMM
On Fri, Jan 5, 2024 at 12:12 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > QDev objects created with qdev_new() need to manually add > their parent relationship with object_property_add_child(). > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > hw/arm/msf2-som.c | 1 + > hw/arm/netduino2.c | 1 + > hw/arm/netduinoplus2.c | 1 + > hw/arm/olimex-stm32-h405.c | 1 + > hw/arm/stm32vldiscovery.c | 1 + > 5 files changed, 5 insertions(+) > > diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c > index 7b3106c790..e93c83c410 100644 > --- a/hw/arm/msf2-som.c > +++ b/hw/arm/msf2-som.c > @@ -66,6 +66,7 @@ static void emcraft_sf2_s2s010_init(MachineState *machine) > memory_region_add_subregion(sysmem, DDR_BASE_ADDRESS, ddr); > > dev = qdev_new(TYPE_MSF2_SOC); > + object_property_add_child(OBJECT(machine), "soc", OBJECT(dev)); > qdev_prop_set_string(dev, "part-name", "M2S010"); > qdev_prop_set_string(dev, "cpu-type", mc->default_cpu_type); > > diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c > index 501f63a77f..8b1a9a2437 100644 > --- a/hw/arm/netduino2.c > +++ b/hw/arm/netduino2.c > @@ -44,6 +44,7 @@ static void netduino2_init(MachineState *machine) > clock_set_hz(sysclk, SYSCLK_FRQ); > > dev = qdev_new(TYPE_STM32F205_SOC); > + object_property_add_child(OBJECT(machine), "soc", OBJECT(dev)); > qdev_connect_clock_in(dev, "sysclk", sysclk); > sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); > > diff --git a/hw/arm/netduinoplus2.c b/hw/arm/netduinoplus2.c > index 2e58984947..bccd100354 100644 > --- a/hw/arm/netduinoplus2.c > +++ b/hw/arm/netduinoplus2.c > @@ -44,6 +44,7 @@ static void netduinoplus2_init(MachineState *machine) > clock_set_hz(sysclk, SYSCLK_FRQ); > > dev = qdev_new(TYPE_STM32F405_SOC); > + object_property_add_child(OBJECT(machine), "soc", OBJECT(dev)); > qdev_connect_clock_in(dev, "sysclk", sysclk); > sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); > > diff --git a/hw/arm/olimex-stm32-h405.c b/hw/arm/olimex-stm32-h405.c > index d793de7c97..4ad7b043be 100644 > --- a/hw/arm/olimex-stm32-h405.c > +++ b/hw/arm/olimex-stm32-h405.c > @@ -47,6 +47,7 @@ static void olimex_stm32_h405_init(MachineState *machine) > clock_set_hz(sysclk, SYSCLK_FRQ); > > dev = qdev_new(TYPE_STM32F405_SOC); > + object_property_add_child(OBJECT(machine), "soc", OBJECT(dev)); > qdev_connect_clock_in(dev, "sysclk", sysclk); > sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); > > diff --git a/hw/arm/stm32vldiscovery.c b/hw/arm/stm32vldiscovery.c > index 190db6118b..cc41935160 100644 > --- a/hw/arm/stm32vldiscovery.c > +++ b/hw/arm/stm32vldiscovery.c > @@ -47,6 +47,7 @@ static void stm32vldiscovery_init(MachineState *machine) > clock_set_hz(sysclk, SYSCLK_FRQ); > > dev = qdev_new(TYPE_STM32F100_SOC); > + object_property_add_child(OBJECT(machine), "soc", OBJECT(dev)); > qdev_connect_clock_in(dev, "sysclk", sysclk); > sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); > > -- > 2.41.0 > >
© 2016 - 2024 Red Hat, Inc.