mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com
Cc: Russell King <linux@arm.linux.org.uk>,
	Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Alessandro Zummo <a.zummo@towertech.it>
Subject: [PATCH 7/7] arm64: rtc: plug the PC CMOS RTC using MMIO accessors
Date: Fri, 25 Apr 2014 10:31:15 +0100	[thread overview]
Message-ID: <1398418275-9671-8-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1398418275-9671-1-git-send-email-marc.zyngier@arm.com>

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

diff --git a/arch/arm64/include/asm/mc146818rtc.h b/arch/arm64/include/asm/mc146818rtc.h
new file mode 100644
index 0000000..79cc1f3
--- /dev/null
+++ b/arch/arm64/include/asm/mc146818rtc.h
@@ -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__ */
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index b2a512e..5944c92 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -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.
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index eb5d05c..d84e3a5 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -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.
-- 
1.8.3.4


      parent reply	other threads:[~2014-04-25  9:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25  9:31 [PATCH 0/7] rtc-cmos: private locking and MMIO support Marc Zyngier
2014-04-25  9:31 ` [PATCH 1/7] rtc-cmos: abstract IO accessors Marc Zyngier
2014-04-25  9:31 ` [PATCH 2/7] rtc-cmos: abstract locking primitives Marc Zyngier
2014-04-25  9:31 ` [PATCH 3/7] rtc-cmos: allow MMIO to be used when initialized from FDT Marc Zyngier
2014-04-25  9:31 ` [PATCH 4/7] rtc-cmos: allow strictly MMIO based configurations Marc Zyngier
2014-04-25  9:31 ` [PATCH 5/7] rtc-cmos: implement driver private locking Marc Zyngier
2014-04-25  9:31 ` [PATCH 6/7] ARM: rtc: update CMOS RTC to support MMIO and private lock Marc Zyngier
2014-04-25 10:27   ` Russell King - ARM Linux
2014-04-25 12:32     ` Marc Zyngier
2014-04-25  9:31 ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1398418275-9671-8-git-send-email-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=a.zummo@towertech.it \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rtc-linux@googlegroups.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®