hw/watchdog/sbsa_gwdt: Make watchdog timer frequency a QOM property
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 26 Apr 2024 12:29:12 +0000 (13:29 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 30 Apr 2024 14:14:15 +0000 (15:14 +0100)
commit88c756bc9e5d38b6e46e631b9875ae954a319ed9
tree2e83719e6cfac0be7cd6806fff7d009bab8180db
parentee4336f9470b74f4dd3493d1fdbd61ff13005f9d
hw/watchdog/sbsa_gwdt: Make watchdog timer frequency a QOM property

Currently the sbsa_gdwt watchdog device hardcodes its frequency at
62.5MHz. In real hardware, this watchdog is supposed to be driven
from the system counter, which also drives the CPU generic timers.
Newer CPU types (in particular from Armv8.6) should have a CPU
generic timer frequency of 1GHz, so we can't leave the watchdog
on the old QEMU default of 62.5GHz.

Make the frequency a QOM property so it can be set by the board,
and have our only board that uses this device set that frequency
to the same value it sets the CPU frequency.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240426122913.3427983-4-peter.maydell@linaro.org
hw/arm/sbsa-ref.c
hw/watchdog/sbsa_gwdt.c
include/hw/watchdog/sbsa_gwdt.h