hw/arm/stm32f100: Wire up sysclk and refclk
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 12 Aug 2021 09:33:42 +0000 (10:33 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 1 Sep 2021 10:08:19 +0000 (11:08 +0100)
commitb5ff0c6183e0c060725becd6fdb43a08b494fdc1
tree212e6ccf34e050636b5d85c85b0a8a26a6bbab6f
parentcabc613f78fc0409ed3cd35994cd85ed3a0915f1
hw/arm/stm32f100: Wire up sysclk and refclk

Wire up the sysclk and refclk for the stm32f100 SoC.  This SoC always
runs the systick refclk at 1/8 the frequency of the main CPU clock,
so the board code only needs to provide a single sysclk clock.

Because there is only one board using this SoC, we convert the SoC
and the board together, rather than splitting it into "add clock to
SoC; connect clock in board; add error check in SoC code that clock
is wired up".

When the systick device starts honouring its clock inputs, this will
fix an emulation inaccuracy in the stm32vldiscovery board where the
systick reference clock was running at 1MHz rather than 3MHz.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Alexandre Iooss <erdnaxe@crans.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Message-id: 20210812093356.1946-12-peter.maydell@linaro.org
hw/arm/stm32f100_soc.c
hw/arm/stm32vldiscovery.c
include/hw/arm/stm32f100_soc.h