hw/arm/stellaris: Create Clock input for watchdog
commit1e31d8ee45920154d62793564cb9463dbdf8e3b5
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 28 Jan 2021 11:41:37 +0000 (28 11:41 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 29 Jan 2021 15:54:43 +0000 (29 15:54 +0000)
tree6388e6c70be358119f8581a7832f19dfc80d0a14
parent4bebb9ad4e473f6433398bfccf4bc1f7786b1c34
hw/arm/stellaris: Create Clock input for watchdog

Create and connect the Clock input for the watchdog device on the
Stellaris boards.  Because the Stellaris boards model the ability to
change the clock rate by programming PLL registers, we have to create
an output Clock on the ssys_state device and wire it up to the
watchdog.

Note that the old comment on ssys_calculate_system_clock() got the
units wrong -- system_clock_scale is in nanoseconds, not
milliseconds.  Improve the commentary to clarify how we are
calculating the period.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210128114145.20536-18-peter.maydell@linaro.org
Message-id: 20210121190622.22000-18-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/arm/stellaris.c