@@ -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
@@ -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;
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@arm.com> --- drivers/rtc/Kconfig | 4 ++++ drivers/rtc/rtc-cmos.c | 5 +++++ 2 files changed, 9 insertions(+)