All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] ARM: qemu-arm: enable RTC
@ 2018-06-28 22:34 Heinrich Schuchardt
  2018-07-02 16:07 ` Tuomas Tynkkynen
  2018-07-20 12:36 ` [U-Boot] [U-Boot,1/1] " Tom Rini
  0 siblings, 2 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2018-06-28 22:34 UTC (permalink / raw)
  To: u-boot

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>
---
 configs/qemu_arm64_defconfig | 2 ++
 configs/qemu_arm_defconfig   | 2 ++
 drivers/rtc/Kconfig          | 7 +++++++
 include/configs/qemu-arm.h   | 3 +++
 4 files changed, 14 insertions(+)

diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig
index cdf5072fe4..e9a35d010f 100644
--- a/configs/qemu_arm64_defconfig
+++ b/configs/qemu_arm64_defconfig
@@ -9,6 +9,7 @@ CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_CMD_PCI=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_DATE=y
 CONFIG_OF_BOARD=y
 CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
@@ -20,6 +21,7 @@ CONFIG_NVME=y
 CONFIG_PCI=y
 CONFIG_DM_PCI=y
 CONFIG_PCIE_ECAM_GENERIC=y
+CONFIG_RTC_PL031=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
 CONFIG_SYSRESET=y
diff --git a/configs/qemu_arm_defconfig b/configs/qemu_arm_defconfig
index bbce6cd719..9d30dc31a5 100644
--- a/configs/qemu_arm_defconfig
+++ b/configs/qemu_arm_defconfig
@@ -9,6 +9,7 @@ CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_CMD_PCI=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_DATE=y
 CONFIG_OF_BOARD=y
 CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
@@ -20,6 +21,7 @@ CONFIG_NVME=y
 CONFIG_PCI=y
 CONFIG_DM_PCI=y
 CONFIG_PCIE_ECAM_GENERIC=y
+CONFIG_RTC_PL031=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
 CONFIG_SYSRESET=y
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index a3f8c8aecc..54365092ec 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -48,6 +48,13 @@ config RTC_RX8010SJ
 	help
 	  Support for Epson RX8010SJ Real Time Clock devices.
 
+config RTC_PL031
+	bool "Enable ARM AMBA PL031 RTC driver"
+	help
+	  The ARM PrimeCell Real Time Clock (PL031) is an optional SoC
+	  peripheral based on the Advanced Microcontroller Bus Architecture
+	  (AMBA). It is emulated in QEMU virtual ARM machines.
+
 config RTC_MV
 	bool "Enable Marvell RTC driver"
 	depends on DM_RTC
diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
index 095aec28b1..be516bac0c 100644
--- a/include/configs/qemu-arm.h
+++ b/include/configs/qemu-arm.h
@@ -24,6 +24,9 @@
 /* For block devices, QEMU emulates an ICH9 AHCI controller over PCI */
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID 6
 
+/* QEMU emulates the ARM AMBA PL031 RTC */
+#define CONFIG_SYS_RTC_PL031_BASE	0x09010000
+
 /* Environment options */
 #define CONFIG_ENV_SIZE				SZ_64K
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-20 12:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-28 22:34 [U-Boot] [PATCH 1/1] ARM: qemu-arm: enable RTC Heinrich Schuchardt
2018-07-02 16:07 ` Tuomas Tynkkynen
2018-07-02 23:51   ` Takahiro AKASHI
2018-07-03  2:07     ` Heinrich Schuchardt
2018-07-03  3:30       ` Heinrich Schuchardt
2018-07-03  5:29       ` Takahiro AKASHI
2018-07-03  6:00         ` Heinrich Schuchardt
2018-07-20 12:36 ` [U-Boot] [U-Boot,1/1] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.