~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-mips/mc146818rtc.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is subject to the terms and conditions of the GNU General Public
  3  * License.  See the file "COPYING" in the main directory of this archive
  4  * for more details.
  5  *
  6  * Machine dependent access functions for RTC registers.
  7  *
  8  * Copyright (C) 1996, 1997, 1998, 2000 Ralf Baechle
  9  */
 10 #ifndef _ASM_MC146818RTC_H
 11 #define _ASM_MC146818RTC_H
 12 
 13 #include <linux/config.h>
 14 #include <asm/io.h>
 15 
 16 #ifndef RTC_PORT
 17 #define RTC_PORT(x)     (0x70 + (x))
 18 #endif
 19 
 20 /*
 21  * The yet supported machines all access the RTC index register via
 22  * an ISA port access but the way to access the date register differs ...
 23  */
 24 #define CMOS_READ(addr) ({ \
 25 rtc_ops->rtc_read_data(addr); \
 26 })
 27 #define CMOS_WRITE(val, addr) ({ \
 28 rtc_ops->rtc_write_data(val, addr); \
 29 })
 30 #define RTC_ALWAYS_BCD \
 31 rtc_ops->rtc_bcd_mode()
 32 
 33 /*
 34  * This structure defines how to access various features of
 35  * different machine types and how to access them.
 36  */
 37 struct rtc_ops {
 38         /* How to access the RTC register in a DS1287.  */
 39         unsigned char (*rtc_read_data)(unsigned long addr);
 40         void (*rtc_write_data)(unsigned char data, unsigned long addr);
 41         int (*rtc_bcd_mode)(void);
 42 };
 43 
 44 extern struct rtc_ops *rtc_ops;
 45 
 46 #ifdef CONFIG_DECSTATION
 47 #define RTC_IRQ 0
 48 #else
 49 #define RTC_IRQ 8
 50 #endif
 51 
 52 #endif /* _ASM_MC146818RTC_H */
 53 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.