]> git.proxmox.com Git - mirror_qemu.git/commit
hw/timer: Add NPCM7xx Timer device model
authorHavard Skinnemoen <hskinnemoen@google.com>
Fri, 11 Sep 2020 05:20:50 +0000 (22:20 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 14 Sep 2020 13:24:58 +0000 (14:24 +0100)
commit85fdd74ff074bf59644131cea9e2ae1f2a8d5fd1
tree7e2ebb5cb57fc1be3f2c0b7c569eeed300025b79
parente331f79eb8226d57e73c522b31a21e2a63e96f44
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>
hw/timer/meson.build
hw/timer/npcm7xx_timer.c [new file with mode: 0644]
hw/timer/trace-events
include/hw/timer/npcm7xx_timer.h [new file with mode: 0644]