On Thu, 19 Jun 2025 at 00:06, Jackson Donaldson <jackson88...@gmail.com> wrote: > > This commit adds the Global Control Register to > max78000_soc > > Signed-off-by: Jackson Donaldson <jc...@duck.com>
> @@ -106,13 +115,21 @@ static void max78000_soc_realize(DeviceState *dev_soc, > Error **errp) > } > dev->id = g_strdup_printf("uart%d", i); > > + object_property_set_link(OBJECT(gcrdev), dev->id, OBJECT(dev), > + &err); The second argument to object_property_set_link() is the name of the link property. That might or might not happen to be the same as the ID of the device you're connecting it to, but you shouldn't be directly accessing DeviceState::id here. Just create the string you need with g_strdup_printf() (and don't forget to use g_autofree so it gets freed). > + > busdev = SYS_BUS_DEVICE(dev); > sysbus_mmio_map(busdev, 0, max78000_uart_addr[i]); > sysbus_connect_irq(busdev, 0, qdev_get_gpio_in(armv7m, > > max78000_uart_irq[i])); > } > > - create_unimplemented_device("globalControl", 0x40000000, 0x400); > + dev = DEVICE(&s->gcr); > + sysbus_realize(SYS_BUS_DEVICE(dev), errp); > + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x40000000); thanks -- PMM