qemu/hw/timer
Havard Skinnemoen 85fdd74ff0 hw/timer: Add NPCM7xx Timer device model
The NPCM730 and NPCM750 SoCs have three timer modules each holding five
timers and some shared registers (e.g. interrupt status).

Each timer runs at 25 MHz divided by a prescaler, and counts down from a
configurable initial value to zero. When zero is reached, the interrupt
flag for the timer is set, and the timer is disabled (one-shot mode) or
reloaded from its initial value (periodic mode).

This implementation is sufficient to boot a Linux kernel configured for
NPCM750. Note that the kernel does not seem to actually turn on the
interrupts.

Reviewed-by: Tyrone Ting <kfting@nuvoton.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Alexander Bulekov <alxndr@bu.edu>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Message-id: 20200911052101.2602693-4-hskinnemoen@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-09-14 14:24:58 +01:00
..
a9gtimer.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
allwinner-a10-pit.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
altera_timer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
arm_mptimer.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
arm_timer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
armv7m_systick.c hw/timer/armv7m_systick: assert that board code set system_clock_scale 2020-09-14 14:23:19 +01:00
aspeed_timer.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
avr_timer16.c hw/timer: avr: Add limited support for 16-bit timer peripheral 2020-07-11 11:02:05 +02:00
bcm2835_systmr.c hw/timer/bcm2835: Add the BCM2835 SYS_timer 2019-10-25 13:09:27 +01:00
cadence_ttc.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
cmsdk-apb-dualtimer.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
cmsdk-apb-timer.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
digic-timer.c hw/timer/digic-timer.c: Switch to transaction-based ptimer API 2019-10-15 18:09:02 +01:00
etraxfs_timer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
exynos4210_mct.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
exynos4210_pwm.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
grlib_gptimer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
hpet.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
i8254_common.c hw/i386: Remove obsolete LoadStateHandler::load_state_old handlers 2019-11-05 23:33:12 +01:00
i8254.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
imx_epit.c hw/timer/imx_epit: Avoid assertion when CR.SWR is written 2020-08-03 17:56:11 +01:00
imx_gpt.c hw/timer/imx_gpt.c: Switch to transaction-based ptimer API 2019-10-15 18:09:03 +01:00
Kconfig hw/timer: avr: Add limited support for 16-bit timer peripheral 2020-07-11 11:02:05 +02:00
lm32_timer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
meson.build hw/timer: Add NPCM7xx Timer device model 2020-09-14 14:24:58 +01:00
milkymist-sysctl.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
mips_gictimer.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
mss-timer.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
npcm7xx_timer.c hw/timer: Add NPCM7xx Timer device model 2020-09-14 14:24:58 +01:00
nrf51_timer.c hw/timer/nrf51_timer: Add trace event of counter value update 2020-05-11 11:05:52 +01:00
omap_gptimer.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
omap_synctimer.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
puv3_ost.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pxa2xx_timer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
renesas_cmt.c hw/timer: RX62N compare match timer (CMT) 2020-06-22 18:37:12 +02:00
renesas_tmr.c hw/timer: RX62N 8-Bit timer (TMR) 2020-06-22 18:37:12 +02:00
sh_timer.c hw/timer/sh_timer: Remove unused 'qemu/timer.h' include 2020-06-22 18:37:12 +02:00
slavio_timer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
stm32f2xx_timer.c hw/timer/stm32f2xx_timer: Remove dead assignment 2020-05-04 14:43:24 +02:00
trace-events hw/timer: Add NPCM7xx Timer device model 2020-09-14 14:24:58 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xilinx_timer.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00