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

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

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

  1 /* $Id: ds1286.h,v 1.1 1998/07/10 01:14:55 ralf Exp $
  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  * mc146818rtc.h - register definitions for the Real-Time-Clock / CMOS RAM
  8  * Copyright Torsten Duwe <duwe@informatik.uni-erlangen.de> 1993
  9  * derived from Data Sheet, Copyright Motorola 1984 (!).
 10  * It was written to be part of the Linux operating system.
 11  *
 12  * Copyright (C) 1998, 1999 Ralf Baechle
 13  */
 14 #ifndef _ASM_DS1286_h
 15 #define _ASM_DS1286_h
 16 
 17 #include <asm/mc146818rtc.h>
 18 
 19 /**********************************************************************
 20  * register summary
 21  **********************************************************************/
 22 #define RTC_HUNDREDTH_SECOND    0
 23 #define RTC_SECONDS             1
 24 #define RTC_MINUTES             2
 25 #define RTC_MINUTES_ALARM       3
 26 #define RTC_HOURS               4
 27 #define RTC_HOURS_ALARM         5
 28 #define RTC_DAY                 6
 29 #define RTC_DAY_ALARM           7
 30 #define RTC_DATE                8
 31 #define RTC_MONTH               9
 32 #define RTC_YEAR                10
 33 #define RTC_CMD                 11
 34 #define RTC_WHSEC               12
 35 #define RTC_WSEC                13
 36 #define RTC_UNUSED              14
 37 
 38 /* RTC_*_alarm is always true if 2 MSBs are set */
 39 # define RTC_ALARM_DONT_CARE    0xC0
 40 
 41 
 42 /*
 43  * Bits in the month register
 44  */
 45 #define RTC_EOSC                0x80
 46 #define RTC_ESQW                0x40
 47 
 48 /*
 49  * Bits in the Command register
 50  */
 51 #define RTC_TDF                 0x01
 52 #define RTC_WAF                 0x02
 53 #define RTC_TDM                 0x04
 54 #define RTC_WAM                 0x08
 55 #define RTC_PU_LVL              0x10
 56 #define RTC_IBH_LO              0x20
 57 #define RTC_IPSW                0x40
 58 #define RTC_TE                  0x80
 59 
 60 /*
 61  * Conversion between binary and BCD.
 62  */
 63 #ifndef BCD_TO_BIN
 64 #define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
 65 #endif
 66 
 67 #ifndef BIN_TO_BCD
 68 #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
 69 #endif
 70 
 71 #endif /* _ASM_DS1286_h */
 72 

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