Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _MC146818RTC_H
     13 #define _MC146818RTC_H
     14 
     15 #include <asm/io.h>
     16 #include <linux/rtc.h>
     17 #include <asm/mc146818rtc.h>
     18 
     19 #define RTC_SECONDS 0
     20 #define RTC_SECONDS_ALARM 1
     21 #define RTC_MINUTES 2
     22 #define RTC_MINUTES_ALARM 3
     23 #define RTC_HOURS 4
     24 #define RTC_HOURS_ALARM 5
     25 
     26 #define RTC_ALARM_DONT_CARE 0xC0
     27 
     28 #define RTC_DAY_OF_WEEK 6
     29 #define RTC_DAY_OF_MONTH 7
     30 #define RTC_MONTH 8
     31 #define RTC_YEAR 9
     32 
     33 #define RTC_REG_A 10
     34 #define RTC_REG_B 11
     35 #define RTC_REG_C 12
     36 #define RTC_REG_D 13
     37 
     38 #define RTC_FREQ_SELECT RTC_REG_A
     39 
     40 #define RTC_UIP 0x80
     41 #define RTC_DIV_CTL 0x70
     42 
     43 #define RTC_REF_CLCK_4MHZ 0x00
     44 #define RTC_REF_CLCK_1MHZ 0x10
     45 #define RTC_REF_CLCK_32KHZ 0x20
     46 
     47 #define RTC_DIV_RESET1 0x60
     48 #define RTC_DIV_RESET2 0x70
     49 
     50 #define RTC_RATE_SELECT 0x0F
     51 
     52 #define RTC_CONTROL RTC_REG_B
     53 #define RTC_SET 0x80
     54 #define RTC_PIE 0x40
     55 #define RTC_AIE 0x20
     56 #define RTC_UIE 0x10
     57 #define RTC_SQWE 0x08
     58 #define RTC_DM_BINARY 0x04
     59 #define RTC_24H 0x02
     60 #define RTC_DST_EN 0x01
     61 
     62 #define RTC_INTR_FLAGS RTC_REG_C
     63 
     64 #define RTC_IRQF 0x80
     65 #define RTC_PF 0x40
     66 #define RTC_AF 0x20
     67 #define RTC_UF 0x10
     68 
     69 #define RTC_VALID RTC_REG_D
     70 #define RTC_VRT 0x80
     71 
     72 #ifndef ARCH_RTC_LOCATION
     73 
     74 #define RTC_IO_EXTENT 0x8
     75 #define RTC_IOMAPPED 1
     76 
     77 #endif
     78 
     79 #endif
     80