hw/arm/stellaris: split stellaris_sys_init()
commita861b3e94eb62495c0e3caac8ef2fb0ce4400a95
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 12 Aug 2021 09:33:47 +0000 (12 10:33 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 1 Sep 2021 10:08:20 +0000 (1 11:08 +0100)
treea6abcee5a2ebb1206e775560073d9a001ce88fa0
parentc08e612662e4bdc84f2e9bd4ae598e8c07a23565
hw/arm/stellaris: split stellaris_sys_init()

Currently the stellaris_sys_init() function creates the
TYPE_STELLARIS_SYS object, sets its properties, realizes it, maps its
MMIO region and connects its IRQ.  In order to support wiring the
sysclk up to the armv7m object, we need to split this function apart,
because to connect the clock output of the STELLARIS_SYS object to
the armv7m object we need to create the STELLARIS_SYS object before
the armv7m object, but we can't wire up the IRQ until after we've
created the armv7m object.

Remove the stellaris_sys_init() function, and instead put the
create/configure/realize parts before we create the armv7m object and
the mmio/irq connection parts afterwards.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alexandre Iooss <erdnaxe@crans.org>
Message-id: 20210812093356.1946-17-peter.maydell@linaro.org
hw/arm/stellaris.c