hw/arm/allwinner: add RTC device support
commita9ad9e73a733fee77b8287b660e2c9894cbc5255
authorNiek Linnenbank <nieklinnenbank@gmail.com>
Wed, 11 Mar 2020 22:18:48 +0000 (11 23:18 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 12 Mar 2020 16:27:33 +0000 (12 16:27 +0000)
tree6d486027c1ec6392b52311ebe959c4640c7fe8c7
parentb71d0385e97e230b45a88c604756c44a748736fb
hw/arm/allwinner: add RTC device support

Allwinner System-on-Chips usually contain a Real Time Clock (RTC)
for non-volatile system date and time keeping. This commit adds a generic
Allwinner RTC device that supports the RTC devices found in Allwinner SoC
family sun4i (A10), sun7i (A20) and sun6i and newer (A31, H2+, H3, etc).
The following RTC functionality and features are implemented:

 * Year-Month-Day read/write
 * Hour-Minute-Second read/write
 * General Purpose storage

The following boards are extended with the RTC device:

 * Cubieboard (hw/arm/cubieboard.c)
 * Orange Pi PC (hw/arm/orangepi.c)

Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20200311221854.30370-13-nieklinnenbank@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/allwinner-a10.c
hw/arm/allwinner-h3.c
hw/rtc/Makefile.objs
hw/rtc/allwinner-rtc.c [new file with mode: 0644]
hw/rtc/trace-events
include/hw/arm/allwinner-a10.h
include/hw/arm/allwinner-h3.h
include/hw/rtc/allwinner-rtc.h [new file with mode: 0644]