[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1398418275-9671-5-git-send-email-marc.zyngier@arm.com>
Date: Fri, 25 Apr 2014 10:31:12 +0100
From: Marc Zyngier <marc.zyngier@....com>
To: linux-kernel@...r.kernel.org, rtc-linux@...glegroups.com
Cc: Russell King <linux@....linux.org.uk>,
Will Deacon <will.deacon@....com>,
Catalin Marinas <catalin.marinas@....com>,
Alessandro Zummo <a.zummo@...ertech.it>
Subject: [PATCH 4/7] rtc-cmos: allow strictly MMIO based configurations
For those new fancy architectures lacking any kind of I/O ports,
and unwilling to emulate them, introduce the new config symbol
RTC_DRV_CMOS_MMIO_STRICT, which provides default (and explosive)
legacy I/O port accessors.
Signed-off-by: Marc Zyngier <marc.zyngier@....com>
---
drivers/rtc/Kconfig | 4 ++++
drivers/rtc/rtc-cmos.c | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 7e88866..10974f7 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -680,6 +680,10 @@ config RTC_DRV_CMOS
config RTC_DRV_CMOS_MMIO
bool
+config RTC_DRV_CMOS_MMIO_STRICT
+ select RTC_DRV_CMOS_MMIO
+ bool
+
config RTC_DRV_ALPHA
bool "Alpha PC-style CMOS"
depends on ALPHA
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index d535e72..e2d1338 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -70,6 +70,11 @@ static const char driver_name[] = "rtc_cmos";
#ifdef CONFIG_RTC_DRV_CMOS_MMIO
static void __iomem *rtc_cmos_base;
+#ifdef CONFIG_RTC_DRV_CMOS_MMIO_STRICT
+#define CMOS_READ(reg) ({BUG(); 0;})
+#define CMOS_WRITE(val,reg) BUG();
+#endif
+
static u8 do_cmos_read(u8 reg)
{
u8 val;
--
1.8.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists