hw/arm/netduino2, netduinoplus2: Set system_clock_scale
commite7e5a9595ab1136845c444141830fca0d2746a73
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 3 Aug 2020 16:55:03 +0000 (3 17:55 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 3 Aug 2020 16:55:03 +0000 (3 17:55 +0100)
tree590db25674096759f198b18bbbe8f1e52146d57e
parent45a150aa2b3492acf6691c7bdbeb25a8545d8345
hw/arm/netduino2, netduinoplus2: Set system_clock_scale

The netduino2 and netduinoplus2 boards forgot to set the system_clock_scale
global, which meant that if guest code used the systick timer in "use
the processor clock" mode it would hang because time never advances.

Set the global to match the documented CPU clock speed of these boards.
Judging by the data sheet this is slightly simplistic because the
SoC allows configuration of the SYSCLK source and frequency via the
RCC (reset and clock control) module, but we don't model that.

Fixes: https://bugs.launchpad.net/qemu/+bug/1876187
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200727162617.26227-1-peter.maydell@linaro.org
hw/arm/netduino2.c
hw/arm/netduinoplus2.c