rtc-v3020.h 938 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * v3020.h - Registers definition and platform data structure for the v3020 RTC.
  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. * Copyright (C) 2006, 8D Technologies inc.
  9. */
  10. #ifndef __LINUX_V3020_H
  11. #define __LINUX_V3020_H
  12. /* The v3020 has only one data pin but which one
  13. * is used depends on the board. */
  14. struct v3020_platform_data {
  15. int leftshift; /* (1<<(leftshift)) & readl() */
  16. };
  17. #define V3020_STATUS_0 0x00
  18. #define V3020_STATUS_1 0x01
  19. #define V3020_SECONDS 0x02
  20. #define V3020_MINUTES 0x03
  21. #define V3020_HOURS 0x04
  22. #define V3020_MONTH_DAY 0x05
  23. #define V3020_MONTH 0x06
  24. #define V3020_YEAR 0x07
  25. #define V3020_WEEK_DAY 0x08
  26. #define V3020_WEEK 0x09
  27. #define V3020_IS_COMMAND(val) ((val)>=0x0E)
  28. #define V3020_CMD_RAM2CLOCK 0x0E
  29. #define V3020_CMD_CLOCK2RAM 0x0F
  30. #endif /* __LINUX_V3020_H */