new file mode 100644
@@ -0,0 +1,10 @@
+/*
+ * Machine dependent access functions for RTC registers.
+ * In the arm64 case, pretty much nothing.
+ */
+#ifndef __ARM64_MC146818RTC_H__
+#define __ARM64_MC146818RTC_H__
+
+#define RTC_ALWAYS_BCD 0
+
+#endif /* __ARM64_MC146818RTC_H__ */
@@ -660,10 +660,11 @@ comment "Platform RTC drivers"
config RTC_DRV_CMOS
tristate "PC-style 'CMOS'"
- depends on X86 || ARM || M32R || PPC || MIPS || SPARC64
+ depends on X86 || ARM || M32R || PPC || MIPS || SPARC64 || ARM64
default y if X86
select RTC_DRV_CMOS_MMIO if ARM
- select RTC_DRV_CMOS_PRIV_LOCK if ARM
+ select RTC_DRV_CMOS_MMIO_STRICT if ARM64
+ select RTC_DRV_CMOS_PRIV_LOCK if (ARM || ARM64)
help
Say "yes" here to get direct support for the real time clock
found in every PC or ACPI-based system, and some other boards.
@@ -754,7 +754,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
address_space = 64;
#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) \
|| defined(__sparc__) || defined(__mips__) \
- || defined(__powerpc__)
+ || defined(__powerpc__) || defined(CONFIG_ARM64)
address_space = 128;
#else
#warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes.
Add the now minimal gunk to enable the PC-style CMOS RTC. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- arch/arm64/include/asm/mc146818rtc.h | 10 ++++++++++ drivers/rtc/Kconfig | 5 +++-- drivers/rtc/rtc-cmos.c | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 arch/arm64/include/asm/mc146818rtc.h