summary refs log tree commit diff stats
path: root/hw/arm/stellaris.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-02-13 16:52:13 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-02-15 13:50:14 +0000
commit7e4a8d9dbeafc89f6a1e2ea6f7a9b0b8979f33d7 (patch)
treed1d7f23b392939a10954badb06fcba2c919a78b2 /hw/arm/stellaris.c
parentcee78fa5134d7193b3185b9ddb86cefd5967c5f8 (diff)
downloadfocaccia-qemu-7e4a8d9dbeafc89f6a1e2ea6f7a9b0b8979f33d7.tar.gz
focaccia-qemu-7e4a8d9dbeafc89f6a1e2ea6f7a9b0b8979f33d7.zip
hw/arm/stellaris: Add missing QOM 'machine' parent
QDev objects created with qdev_new() need to manually add
their parent relationship with object_property_add_child().

This commit plug the devices which aren't part of the SoC;
they will be plugged into a SoC container in the next one.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240213155214.13619-4-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/stellaris.c')
-rw-r--r--hw/arm/stellaris.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index d3a12fe51c..d9884286b3 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -1271,10 +1271,13 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board)
                                    &error_fatal);
 
             ssddev = qdev_new("ssd0323");
+            object_property_add_child(OBJECT(ms), "oled", OBJECT(ssddev));
             qdev_prop_set_uint8(ssddev, "cs", 1);
             qdev_realize_and_unref(ssddev, bus, &error_fatal);
 
             gpio_d_splitter = qdev_new(TYPE_SPLIT_IRQ);
+            object_property_add_child(OBJECT(ms), "splitter",
+                                      OBJECT(gpio_d_splitter));
             qdev_prop_set_uint32(gpio_d_splitter, "num-lines", 2);
             qdev_realize_and_unref(gpio_d_splitter, NULL, &error_fatal);
             qdev_connect_gpio_out(
@@ -1314,6 +1317,7 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board)
         DeviceState *gpad;
 
         gpad = qdev_new(TYPE_STELLARIS_GAMEPAD);
+        object_property_add_child(OBJECT(ms), "gamepad", OBJECT(gpad));
         for (i = 0; i < ARRAY_SIZE(gpad_keycode); i++) {
             qlist_append_int(gpad_keycode_list, gpad_keycode[i]);
         }