]> git.proxmox.com Git - mirror_qemu.git/commit
hw/timer/bcm2835: Support the timer COMPARE registers
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 10 Oct 2020 20:37:08 +0000 (22:37 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 20 Oct 2020 15:12:00 +0000 (16:12 +0100)
commitbe95dffa326a63f6f850d389dbe358d25e8ba20b
treed5798f3b95bf5bc41b8ffe4c75f3430b60c52aff
parentcdb490da8695ec67dbc151335b31450abb9e564e
hw/timer/bcm2835: Support the timer COMPARE registers

This peripheral has 1 free-running timer and 4 compare registers.

Only the free-running timer is implemented. Add support the
COMPARE registers (each register is wired to an IRQ).

Reference: "BCM2835 ARM Peripherals" datasheet [*]
            chapter 12 "System Timer":

  The System Timer peripheral provides four 32-bit timer channels
  and a single 64-bit free running counter. Each channel has an
  output compare register, which is compared against the 32 least
  significant bits of the free running counter values. When the
  two values match, the system timer peripheral generates a signal
  to indicate a match for the appropriate channel. The match signal
  is then fed into the interrupt controller.

This peripheral is used since Linux 3.7, commit ee4af5696720
("ARM: bcm2835: add system timer").

[*] https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Message-id: 20201010203709.3116542-4-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/timer/bcm2835_systmr.c
hw/timer/trace-events
include/hw/timer/bcm2835_systmr.h