On Thu, 19 Jun 2025 at 00:06, Jackson Donaldson <jackson88...@gmail.com> wrote: > > This commit adds the instruction cache controller > to max78000_soc > > Signed-off-by: Jackson Donaldson <jc...@duck.com> > --- > hw/arm/max78000_soc.c | 19 +++++++++++++++---- > include/hw/arm/max78000_soc.h | 6 ++++++ > 2 files changed, 21 insertions(+), 4 deletions(-) > > diff --git a/hw/arm/max78000_soc.c b/hw/arm/max78000_soc.c > index 9676ada6a2..8d8d2dce61 100644 > --- a/hw/arm/max78000_soc.c > +++ b/hw/arm/max78000_soc.c > @@ -17,12 +17,19 @@ > #include "hw/qdev-clock.h" > #include "hw/misc/unimp.h" > > +static const uint32_t max78000_icc_addr[] = {0x4002a000, 0x4002a800}; > + > static void max78000_soc_initfn(Object *obj) > { > MAX78000State *s = MAX78000_SOC(obj); > + int i; > > object_initialize_child(obj, "armv7m", &s->armv7m, TYPE_ARMV7M); > > + for (i = 0; i < MAX78000_NUM_ICC; i++) { > + object_initialize_child(obj, "icc[*]", &s->icc[i], > TYPE_MAX78000_ICC);
You should give each child a unique name: g_autofree char *name = g_strdup_printf("icc%d", i); object_initialize_child(obj, name, ...); > + } > + > s->sysclk = qdev_init_clock_in(DEVICE(s), "sysclk", NULL, NULL, 0); > } Otherwise this looks good. -- PMM