hw/timer/bcm2835: Add the BCM2835 SYS_timer
commitd05be883fc92f6f57ba1805ff2a99deb035557a2
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 19 Oct 2019 23:47:02 +0000 (20 01:47 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 25 Oct 2019 12:09:27 +0000 (25 13:09 +0100)
treeb9730e67b9cd7a874a1efa3636559f95689455da
parentd442d95f2fa6dcc9ab227903898fb94516cbbaed
hw/timer/bcm2835: Add the BCM2835 SYS_timer

Add the 64-bit free running timer. Do not model the COMPARE register
(no IRQ generated).
This timer is used by Linux kernel and recently U-Boot:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clocksource/bcm2835_timer.c?h=v3.7
https://github.com/u-boot/u-boot/blob/v2019.07/include/configs/rpi.h#L19

Datasheet used:
https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20191019234715.25750-4-f4bug@amsat.org
[PMM: squashed in switch to using memset in reset]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/timer/Makefile.objs
hw/timer/bcm2835_systmr.c [new file with mode: 0644]
hw/timer/trace-events
include/hw/timer/bcm2835_systmr.h [new file with mode: 0644]