ds1742rtc.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * ds1742rtc.h - register definitions for the Real-Time-Clock / CMOS RAM
  3. *
  4. * Copyright (C) 1999-2001 Toshiba Corporation
  5. * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org)
  6. *
  7. * Permission is hereby granted to copy, modify and redistribute this code
  8. * in terms of the GNU Library General Public License, Version 2 or later,
  9. * at your option.
  10. */
  11. #ifndef __LINUX_DS1742RTC_H
  12. #define __LINUX_DS1742RTC_H
  13. #include <asm/ds1742.h>
  14. #define RTC_BRAM_SIZE 0x800
  15. #define RTC_OFFSET 0x7f8
  16. /*
  17. * Register summary
  18. */
  19. #define RTC_CONTROL (RTC_OFFSET + 0)
  20. #define RTC_CENTURY (RTC_OFFSET + 0)
  21. #define RTC_SECONDS (RTC_OFFSET + 1)
  22. #define RTC_MINUTES (RTC_OFFSET + 2)
  23. #define RTC_HOURS (RTC_OFFSET + 3)
  24. #define RTC_DAY (RTC_OFFSET + 4)
  25. #define RTC_DATE (RTC_OFFSET + 5)
  26. #define RTC_MONTH (RTC_OFFSET + 6)
  27. #define RTC_YEAR (RTC_OFFSET + 7)
  28. #define RTC_CENTURY_MASK 0x3f
  29. #define RTC_SECONDS_MASK 0x7f
  30. #define RTC_DAY_MASK 0x07
  31. /*
  32. * Bits in the Control/Century register
  33. */
  34. #define RTC_WRITE 0x80
  35. #define RTC_READ 0x40
  36. /*
  37. * Bits in the Seconds register
  38. */
  39. #define RTC_STOP 0x80
  40. /*
  41. * Bits in the Day register
  42. */
  43. #define RTC_BATT_FLAG 0x80
  44. #define RTC_FREQ_TEST 0x40
  45. #endif /* __LINUX_DS1742RTC_H */