Commit b19886b9469174213877ef37670ce35c55acb456
Committed by
Tom Rini
1 parent
b71bb87af9
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
ARM: qemu-arm: enable RTC
QEMU provides an emulated ARM AMBA PrimeCell PL031 RTC. The patch sets the base address in the board include file according to the definition in hw/arm/virt.c of the QEMU source. It defines the Kconfig option for the existing driver, and enables the RTC driver in qemu_arm64_defconfig and qemu_arm_defconfig as well as the date command. We need an RTC to provide the GetTime() runtime service in the UEFI subsystem. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Tested-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Showing 4 changed files with 14 additions and 0 deletions Side-by-side Diff
configs/qemu_arm64_defconfig
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | # CONFIG_DISPLAY_BOARDINFO is not set |
10 | 10 | CONFIG_CMD_PCI=y |
11 | 11 | CONFIG_CMD_USB=y |
12 | +CONFIG_CMD_DATE=y | |
12 | 13 | CONFIG_OF_BOARD=y |
13 | 14 | CONFIG_SCSI_AHCI=y |
14 | 15 | CONFIG_AHCI_PCI=y |
... | ... | @@ -20,6 +21,7 @@ |
20 | 21 | CONFIG_PCI=y |
21 | 22 | CONFIG_DM_PCI=y |
22 | 23 | CONFIG_PCIE_ECAM_GENERIC=y |
24 | +CONFIG_RTC_PL031=y | |
23 | 25 | CONFIG_SCSI=y |
24 | 26 | CONFIG_DM_SCSI=y |
25 | 27 | CONFIG_SYSRESET=y |
configs/qemu_arm_defconfig
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | # CONFIG_DISPLAY_BOARDINFO is not set |
10 | 10 | CONFIG_CMD_PCI=y |
11 | 11 | CONFIG_CMD_USB=y |
12 | +CONFIG_CMD_DATE=y | |
12 | 13 | CONFIG_OF_BOARD=y |
13 | 14 | CONFIG_SCSI_AHCI=y |
14 | 15 | CONFIG_AHCI_PCI=y |
... | ... | @@ -20,6 +21,7 @@ |
20 | 21 | CONFIG_PCI=y |
21 | 22 | CONFIG_DM_PCI=y |
22 | 23 | CONFIG_PCIE_ECAM_GENERIC=y |
24 | +CONFIG_RTC_PL031=y | |
23 | 25 | CONFIG_SCSI=y |
24 | 26 | CONFIG_DM_SCSI=y |
25 | 27 | CONFIG_SYSRESET=y |
drivers/rtc/Kconfig
... | ... | @@ -48,6 +48,13 @@ |
48 | 48 | help |
49 | 49 | Support for Epson RX8010SJ Real Time Clock devices. |
50 | 50 | |
51 | +config RTC_PL031 | |
52 | + bool "Enable ARM AMBA PL031 RTC driver" | |
53 | + help | |
54 | + The ARM PrimeCell Real Time Clock (PL031) is an optional SoC | |
55 | + peripheral based on the Advanced Microcontroller Bus Architecture | |
56 | + (AMBA). It is emulated in QEMU virtual ARM machines. | |
57 | + | |
51 | 58 | config RTC_MV |
52 | 59 | bool "Enable Marvell RTC driver" |
53 | 60 | depends on DM_RTC |
include/configs/qemu-arm.h
... | ... | @@ -24,6 +24,9 @@ |
24 | 24 | /* For block devices, QEMU emulates an ICH9 AHCI controller over PCI */ |
25 | 25 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 6 |
26 | 26 | |
27 | +/* QEMU emulates the ARM AMBA PL031 RTC */ | |
28 | +#define CONFIG_SYS_RTC_PL031_BASE 0x09010000 | |
29 | + | |
27 | 30 | /* Environment options */ |
28 | 31 | #define CONFIG_ENV_SIZE SZ_64K |
29 | 32 |