qemu-e2k/hw/timer
Peter Maydell 1a9b30646e hw/timer/cmsdk-apb-timer: run or stop timer on writes to RELOAD and VALUE
If the CMSDK APB timer is set up with a zero RELOAD value
then it will count down to zero, fire once and then stay
at zero. From the point of view of the ptimer system, the
timer is disabled; but the enable bit in the CTRL register
is still set and if the guest subsequently writes to the
RELOAD or VALUE registers this should cause the timer to
start counting down again.

Add code to the write paths for RELOAD and VALUE so that
we correctly restart the timer in this situation.

Conversely, if the new RELOAD and VALUE are both zero,
we should stop the ptimer.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Message-id: 20180703171044.9503-5-peter.maydell@linaro.org
2018-07-09 14:51:34 +01:00
..
Makefile.objs hw/timer: Add basic M41T80 emulation 2018-07-03 09:56:52 +10:00
a9gtimer.c
allwinner-a10-pit.c
altera_timer.c
arm_mptimer.c
arm_timer.c
armv7m_systick.c
aspeed_timer.c aspeed/timer: use the APB frequency from the SCU 2018-06-26 17:50:42 +01:00
cadence_ttc.c
cmsdk-apb-timer.c hw/timer/cmsdk-apb-timer: run or stop timer on writes to RELOAD and VALUE 2018-07-09 14:51:34 +01:00
digic-timer.c hw/digic: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
ds1338.c
etraxfs_timer.c
exynos4210_mct.c
exynos4210_pwm.c
exynos4210_rtc.c
grlib_gptimer.c
hpet.c
i8254.c
i8254_common.c
imx_epit.c
imx_gpt.c
lm32_timer.c
m41t80.c hw/timer: Add basic M41T80 emulation 2018-07-03 09:56:52 +10:00
m48t59-internal.h hw/timer/mt48t59: Fix bit-rotten NVRAM_PRINTF format strings 2018-05-20 08:50:16 +03:00
m48t59-isa.c
m48t59.c hw/timer/mt48t59: Fix bit-rotten NVRAM_PRINTF format strings 2018-05-20 08:50:16 +03:00
mc146818rtc.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
milkymist-sysctl.c
mips_gictimer.c
mss-timer.c
omap_gptimer.c
omap_synctimer.c
pl031.c
puv3_ost.c
pxa2xx_timer.c
sh_timer.c hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
slavio_timer.c
stm32f2xx_timer.c
sun4v-rtc.c
trace-events xlnx-zynqmp-rtc: Add basic time support 2018-03-02 10:45:34 +00:00
twl92230.c hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
xilinx_timer.c
xlnx-zynqmp-rtc.c xlnx-zynqmp-rtc: Add basic time support 2018-03-02 10:45:34 +00:00