qemu-e2k/hw/timer
Richard Petri 77cd997161 hw/timer/armv7m_systick: Update clock source before enabling timer
Starting the SysTick timer and changing the clock source a the same time
will result in an error, if the previous clock period was zero. For exmaple,
on the mps2-tz platforms, no refclk is present. Right after reset, the
configured ptimer period is zero, and trying to enabling it will turn it off
right away. E.g., code running on the platform setting

    SysTick->CTRL  = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;

should change the clock source and enable the timer on real hardware, but
resulted in an error in qemu.

Signed-off-by: Richard Petri <git@rpls.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220201192650.289584-1-git@rpls.de
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-02-08 10:56:28 +00:00
..
a9gtimer.c
allwinner-a10-pit.c
altera_timer.c
arm_mptimer.c
arm_timer.c
armv7m_systick.c hw/timer/armv7m_systick: Update clock source before enabling timer 2022-02-08 10:56:28 +00:00
aspeed_timer.c
avr_timer16.c
bcm2835_systmr.c
cadence_ttc.c
cmsdk-apb-dualtimer.c
cmsdk-apb-timer.c
digic-timer.c
etraxfs_timer.c hw/timer/etraxfs_timer: Add vmstate for ETRAX timers 2022-01-18 12:32:16 +01:00
exynos4210_mct.c
exynos4210_pwm.c
grlib_gptimer.c
hpet.c
i8254_common.c
i8254.c
ibex_timer.c hw: timer: ibex_timer: update/add reg address 2022-01-21 15:52:56 +10:00
imx_epit.c
imx_gpt.c
Kconfig hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
meson.build hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
mips_gictimer.c
mss-timer.c
npcm7xx_timer.c
nrf51_timer.c
omap_gptimer.c
omap_synctimer.c
pxa2xx_timer.c
renesas_cmt.c
renesas_tmr.c
sh_timer.c hw/timer/sh_timer: Remove use of hw_error 2021-10-30 18:39:37 +02:00
sifive_pwm.c hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
slavio_timer.c
sse-counter.c
sse-timer.c
stellaris-gptm.c hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale 2021-09-01 11:08:20 +01:00
stm32f2xx_timer.c
trace-events hw/sh4: Change debug printfs to traces 2021-10-30 18:39:37 +02:00
trace.h
xilinx_timer.c