aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-02-10 04:46:02 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:32 -0500
commit7be2c7c96aff2871240d61fef508c41176c688b5 (patch)
tree37d39d2869b99021d0157f2ac3982a03901e0943 /include/linux
parentf1f8810cf48dd88ee70e974924f2dd76e5669dd5 (diff)
[PATCH] RTC framework driver for CMOS RTCs
This is an "RTC framework" driver for the "CMOS" RTCs which are standard on PCs and some other platforms. That's MC146818 compatible silicon. Advantages of this vs. drivers/char/rtc.c (use one _or_ the other, only one will be able to claim the RTC irq) include: - This leverages both the new RTC framework and the driver model; both PNPACPI and platform device modes are supported. (A separate patch creates a platform device on PCs where PNPACPI isn't configured.) - It supports common extensions like longer alarms. (A separate patch exports that information from ACPI through platform_data.) - Likewise, system wakeup events use "real driver model support", with policy control via sysfs "wakeup" attributes and and using normal rtc ioctls to manage wakeup. (Patch in the works. The ACPI hooks are known; /proc/acpi/alarm can vanish. Making it work with EFI will be a minor challenge to someone with e.g. a MiniMac.) It's not yet been tested on non-x86 systems, without ACPI, or with HPET. And the RTC framework will surely have teething pains on "mainstream" PC-based systems (though must embedded Linux systems use it heavily), not limited to sorting out the "/dev/rtc0" issue (udev easily tweaked). Also, the ALSA rtctimer code doesn't use the new RTC API. Otherwise, this should be a no-known-regressions replacement for the old drivers/char/rtc.c driver, and should help the non-embedded distros (and the new timekeeping code) start to switch to the framework. Note also that any systems using "rtc-m48t86" are candidates to switch over to this more functional driver; the platform data is different, and the way bytes are read is different, but otherwise those chips should be compatible. [akpm@osdl.org: sparc32 fix] [akpm@osdl.org: sparc64 fix] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Woody Suwalski <woodys@xandros.com> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mc146818rtc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h
index 432b2fa24929..bdc01127dced 100644
--- a/include/linux/mc146818rtc.h
+++ b/include/linux/mc146818rtc.h
@@ -18,6 +18,16 @@
18#ifdef __KERNEL__ 18#ifdef __KERNEL__
19#include <linux/spinlock.h> /* spinlock_t */ 19#include <linux/spinlock.h> /* spinlock_t */
20extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ 20extern spinlock_t rtc_lock; /* serialize CMOS RAM access */
21
22/* Some RTCs extend the mc146818 register set to support alarms of more
23 * than 24 hours in the future; or dates that include a century code.
24 * This platform_data structure can pass this information to the driver.
25 */
26struct cmos_rtc_board_info {
27 u8 rtc_day_alarm; /* zero, or register index */
28 u8 rtc_mon_alarm; /* zero, or register index */
29 u8 rtc_century; /* zero, or register index */
30};
21#endif 31#endif
22 32
23/********************************************************************** 33/**********************************************************************