aboutsummaryrefslogtreecommitdiff
path: root/include/hw/arm/allwinner-h3.h
diff options
context:
space:
mode:
authorNiek Linnenbank <nieklinnenbank@gmail.com>2020-03-11 23:18:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-03-12 16:27:33 +0000
commita9ad9e73a733fee77b8287b660e2c9894cbc5255 (patch)
tree6d486027c1ec6392b52311ebe959c4640c7fe8c7 /include/hw/arm/allwinner-h3.h
parentb71d0385e97e230b45a88c604756c44a748736fb (diff)
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>
Diffstat (limited to 'include/hw/arm/allwinner-h3.h')
-rw-r--r--include/hw/arm/allwinner-h3.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/arm/allwinner-h3.h b/include/hw/arm/allwinner-h3.h
index 065d020c73..82e4e59216 100644
--- a/include/hw/arm/allwinner-h3.h
+++ b/include/hw/arm/allwinner-h3.h
@@ -46,6 +46,7 @@
#include "hw/misc/allwinner-sid.h"
#include "hw/sd/allwinner-sdhost.h"
#include "hw/net/allwinner-sun8i-emac.h"
+#include "hw/rtc/allwinner-rtc.h"
#include "target/arm/cpu.h"
#include "sysemu/block-backend.h"
@@ -88,6 +89,7 @@ enum {
AW_H3_GIC_CPU,
AW_H3_GIC_HYP,
AW_H3_GIC_VCPU,
+ AW_H3_RTC,
AW_H3_CPUCFG,
AW_H3_SDRAM
};
@@ -129,6 +131,7 @@ typedef struct AwH3State {
AwSidState sid;
AwSdHostState mmc0;
AwSun8iEmacState emac;
+ AwRtcState rtc;
GICState gic;
MemoryRegion sram_a1;
MemoryRegion sram_a2;