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

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

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

  1 /* $Id$
  2  *
  3  * This file is subject to the terms and conditions of the GNU General Public
  4  * License.  See the file "COPYING" in the main directory of this archive
  5  * for more details.
  6  *
  7  * Machine dependent access functions for RTC registers.
  8  *
  9  * Copyright (C) 1996, 1997, 1998 Ralf Baechle
 10  */
 11 #ifndef _ASM_MC146818RTC_H
 12 #define _ASM_MC146818RTC_H
 13 
 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 #define RTC_IRQ 8
 47 
 48 #endif /* _ASM_MC146818RTC_H */
 49 

~ [ 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.