From 38e0e8c0550eaed1af48ec5ad9ddb8a25e8b04ae Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Mon, 10 Jul 2006 04:45:30 -0700 Subject: [PATCH] char/rtc: Handle memory-mapped chips properly Handle memory-mapped chips properly, needed for example on DECstations. This support was in Linux 2.4 but for some reason got lost in 2.6. This patch is taken directly from the linux-mips repository. [akpm@osdl.org: cleanup] Signed-off-by: Maciej W. Rozycki Signed-off-by: Martin Michlmayr Cc: Paul Gortmaker Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-mips/mach-dec/mc146818rtc.h | 2 ++ include/linux/mc146818rtc.h | 7 +++++++ 2 files changed, 9 insertions(+) (limited to 'include') diff --git a/include/asm-mips/mach-dec/mc146818rtc.h b/include/asm-mips/mach-dec/mc146818rtc.h index 6d37a567580..6724e99e43e 100644 --- a/include/asm-mips/mach-dec/mc146818rtc.h +++ b/include/asm-mips/mach-dec/mc146818rtc.h @@ -19,6 +19,8 @@ extern volatile u8 *dec_rtc_base; +#define ARCH_RTC_LOCATION + #define RTC_PORT(x) CPHYSADDR((long)dec_rtc_base) #define RTC_IO_EXTENT dec_kn_slot_size #define RTC_IOMAPPED 0 diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index bbc93ae217e..432b2fa2492 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h @@ -89,4 +89,11 @@ extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ # define RTC_VRT 0x80 /* valid RAM and time */ /**********************************************************************/ +#ifndef ARCH_RTC_LOCATION /* Override by ? */ + +#define RTC_IO_EXTENT 0x8 +#define RTC_IOMAPPED 1 /* Default to I/O mapping. */ + +#endif /* ARCH_RTC_LOCATION */ + #endif /* _MC146818RTC_H */ -- cgit v1.2.3