ds1286.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 1998, 1999, 2003 Ralf Baechle
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. */
  8. #ifndef __LINUX_DS1286_H
  9. #define __LINUX_DS1286_H
  10. #include <asm/ds1286.h>
  11. /**********************************************************************
  12. * register summary
  13. **********************************************************************/
  14. #define RTC_HUNDREDTH_SECOND 0
  15. #define RTC_SECONDS 1
  16. #define RTC_MINUTES 2
  17. #define RTC_MINUTES_ALARM 3
  18. #define RTC_HOURS 4
  19. #define RTC_HOURS_ALARM 5
  20. #define RTC_DAY 6
  21. #define RTC_DAY_ALARM 7
  22. #define RTC_DATE 8
  23. #define RTC_MONTH 9
  24. #define RTC_YEAR 10
  25. #define RTC_CMD 11
  26. #define RTC_WHSEC 12
  27. #define RTC_WSEC 13
  28. #define RTC_UNUSED 14
  29. /* RTC_*_alarm is always true if 2 MSBs are set */
  30. # define RTC_ALARM_DONT_CARE 0xC0
  31. /*
  32. * Bits in the month register
  33. */
  34. #define RTC_EOSC 0x80
  35. #define RTC_ESQW 0x40
  36. /*
  37. * Bits in the Command register
  38. */
  39. #define RTC_TDF 0x01
  40. #define RTC_WAF 0x02
  41. #define RTC_TDM 0x04
  42. #define RTC_WAM 0x08
  43. #define RTC_PU_LVL 0x10
  44. #define RTC_IBH_LO 0x20
  45. #define RTC_IPSW 0x40
  46. #define RTC_TE 0x80
  47. #endif /* __LINUX_DS1286_H */