regs-timers.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * linux/arch/arm/mach-mmp/include/mach/regs-timers.h
  3. *
  4. * Timers Module
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_MACH_REGS_TIMERS_H
  11. #define __ASM_MACH_REGS_TIMERS_H
  12. #include <mach/addr-map.h>
  13. #define TIMERS1_VIRT_BASE (APB_VIRT_BASE + 0x14000)
  14. #define TIMERS2_VIRT_BASE (APB_VIRT_BASE + 0x16000)
  15. #define TMR_CCR (0x0000)
  16. #define TMR_TN_MM(n, m) (0x0004 + ((n) << 3) + (((n) + (m)) << 2))
  17. #define TMR_CR(n) (0x0028 + ((n) << 2))
  18. #define TMR_SR(n) (0x0034 + ((n) << 2))
  19. #define TMR_IER(n) (0x0040 + ((n) << 2))
  20. #define TMR_PLVR(n) (0x004c + ((n) << 2))
  21. #define TMR_PLCR(n) (0x0058 + ((n) << 2))
  22. #define TMR_WMER (0x0064)
  23. #define TMR_WMR (0x0068)
  24. #define TMR_WVR (0x006c)
  25. #define TMR_WSR (0x0070)
  26. #define TMR_ICR(n) (0x0074 + ((n) << 2))
  27. #define TMR_WICR (0x0080)
  28. #define TMR_CER (0x0084)
  29. #define TMR_CMR (0x0088)
  30. #define TMR_ILR(n) (0x008c + ((n) << 2))
  31. #define TMR_WCR (0x0098)
  32. #define TMR_WFAR (0x009c)
  33. #define TMR_WSAR (0x00A0)
  34. #define TMR_CVWR(n) (0x00A4 + ((n) << 2))
  35. #define TMR_CCR_CS_0(x) (((x) & 0x3) << 0)
  36. #define TMR_CCR_CS_1(x) (((x) & 0x7) << 2)
  37. #define TMR_CCR_CS_2(x) (((x) & 0x3) << 5)
  38. #endif /* __ASM_MACH_REGS_TIMERS_H */