regs-apbc.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * linux/arch/arm/mach-mmp/include/mach/regs-apbc.h
  3. *
  4. * Application Peripheral Bus Clock Unit
  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_APBC_H
  11. #define __ASM_MACH_REGS_APBC_H
  12. #include <mach/addr-map.h>
  13. #define APBC_VIRT_BASE (APB_VIRT_BASE + 0x015000)
  14. #define APBC_REG(x) (APBC_VIRT_BASE + (x))
  15. /*
  16. * APB clock register offsets for PXA168
  17. */
  18. #define APBC_PXA168_UART1 APBC_REG(0x000)
  19. #define APBC_PXA168_UART2 APBC_REG(0x004)
  20. #define APBC_PXA168_GPIO APBC_REG(0x008)
  21. #define APBC_PXA168_PWM1 APBC_REG(0x00c)
  22. #define APBC_PXA168_PWM2 APBC_REG(0x010)
  23. #define APBC_PXA168_PWM3 APBC_REG(0x014)
  24. #define APBC_PXA168_PWM4 APBC_REG(0x018)
  25. #define APBC_PXA168_RTC APBC_REG(0x028)
  26. #define APBC_PXA168_TWSI0 APBC_REG(0x02c)
  27. #define APBC_PXA168_KPC APBC_REG(0x030)
  28. #define APBC_PXA168_TIMERS APBC_REG(0x034)
  29. #define APBC_PXA168_AIB APBC_REG(0x03c)
  30. #define APBC_PXA168_SW_JTAG APBC_REG(0x040)
  31. #define APBC_PXA168_ONEWIRE APBC_REG(0x048)
  32. #define APBC_PXA168_ASFAR APBC_REG(0x050)
  33. #define APBC_PXA168_ASSAR APBC_REG(0x054)
  34. #define APBC_PXA168_TWSI1 APBC_REG(0x06c)
  35. #define APBC_PXA168_UART3 APBC_REG(0x070)
  36. #define APBC_PXA168_AC97 APBC_REG(0x084)
  37. #define APBC_PXA168_SSP1 APBC_REG(0x81c)
  38. #define APBC_PXA168_SSP2 APBC_REG(0x820)
  39. #define APBC_PXA168_SSP3 APBC_REG(0x84c)
  40. #define APBC_PXA168_SSP4 APBC_REG(0x858)
  41. #define APBC_PXA168_SSP5 APBC_REG(0x85c)
  42. /*
  43. * APB Clock register offsets for PXA910
  44. */
  45. #define APBC_PXA910_UART0 APBC_REG(0x000)
  46. #define APBC_PXA910_UART1 APBC_REG(0x004)
  47. #define APBC_PXA910_GPIO APBC_REG(0x008)
  48. #define APBC_PXA910_PWM1 APBC_REG(0x00c)
  49. #define APBC_PXA910_PWM2 APBC_REG(0x010)
  50. #define APBC_PXA910_PWM3 APBC_REG(0x014)
  51. #define APBC_PXA910_PWM4 APBC_REG(0x018)
  52. #define APBC_PXA910_SSP1 APBC_REG(0x01c)
  53. #define APBC_PXA910_SSP2 APBC_REG(0x020)
  54. #define APBC_PXA910_IPC APBC_REG(0x024)
  55. #define APBC_PXA910_TWSI0 APBC_REG(0x02c)
  56. #define APBC_PXA910_KPC APBC_REG(0x030)
  57. #define APBC_PXA910_TIMERS APBC_REG(0x034)
  58. #define APBC_PXA910_TBROT APBC_REG(0x038)
  59. #define APBC_PXA910_AIB APBC_REG(0x03c)
  60. #define APBC_PXA910_SW_JTAG APBC_REG(0x040)
  61. #define APBC_PXA910_TIMERS1 APBC_REG(0x044)
  62. #define APBC_PXA910_ONEWIRE APBC_REG(0x048)
  63. #define APBC_PXA910_SSP3 APBC_REG(0x04c)
  64. #define APBC_PXA910_ASFAR APBC_REG(0x050)
  65. #define APBC_PXA910_ASSAR APBC_REG(0x054)
  66. /*
  67. * APB Clock register offsets for MMP2
  68. */
  69. #define APBC_MMP2_RTC APBC_REG(0x000)
  70. #define APBC_MMP2_TWSI1 APBC_REG(0x004)
  71. #define APBC_MMP2_TWSI2 APBC_REG(0x008)
  72. #define APBC_MMP2_TWSI3 APBC_REG(0x00c)
  73. #define APBC_MMP2_TWSI4 APBC_REG(0x010)
  74. #define APBC_MMP2_ONEWIRE APBC_REG(0x014)
  75. #define APBC_MMP2_KPC APBC_REG(0x018)
  76. #define APBC_MMP2_TB_ROTARY APBC_REG(0x01c)
  77. #define APBC_MMP2_SW_JTAG APBC_REG(0x020)
  78. #define APBC_MMP2_TIMERS APBC_REG(0x024)
  79. #define APBC_MMP2_UART1 APBC_REG(0x02c)
  80. #define APBC_MMP2_UART2 APBC_REG(0x030)
  81. #define APBC_MMP2_UART3 APBC_REG(0x034)
  82. #define APBC_MMP2_GPIO APBC_REG(0x038)
  83. #define APBC_MMP2_PWM0 APBC_REG(0x03c)
  84. #define APBC_MMP2_PWM1 APBC_REG(0x040)
  85. #define APBC_MMP2_PWM2 APBC_REG(0x044)
  86. #define APBC_MMP2_PWM3 APBC_REG(0x048)
  87. #define APBC_MMP2_SSP0 APBC_REG(0x04c)
  88. #define APBC_MMP2_SSP1 APBC_REG(0x050)
  89. #define APBC_MMP2_SSP2 APBC_REG(0x054)
  90. #define APBC_MMP2_SSP3 APBC_REG(0x058)
  91. #define APBC_MMP2_SSP4 APBC_REG(0x05c)
  92. #define APBC_MMP2_SSP5 APBC_REG(0x060)
  93. #define APBC_MMP2_AIB APBC_REG(0x064)
  94. #define APBC_MMP2_ASFAR APBC_REG(0x068)
  95. #define APBC_MMP2_ASSAR APBC_REG(0x06c)
  96. #define APBC_MMP2_USIM APBC_REG(0x070)
  97. #define APBC_MMP2_MPMU APBC_REG(0x074)
  98. #define APBC_MMP2_IPC APBC_REG(0x078)
  99. #define APBC_MMP2_TWSI5 APBC_REG(0x07c)
  100. #define APBC_MMP2_TWSI6 APBC_REG(0x080)
  101. #define APBC_MMP2_TWSI_INTSTS APBC_REG(0x084)
  102. #define APBC_MMP2_UART4 APBC_REG(0x088)
  103. #define APBC_MMP2_RIPC APBC_REG(0x08c)
  104. #define APBC_MMP2_THSENS1 APBC_REG(0x090) /* Thermal Sensor */
  105. #define APBC_MMP2_THSENS_INTSTS APBC_REG(0x0a4)
  106. /* Common APB clock register bit definitions */
  107. #define APBC_APBCLK (1 << 0) /* APB Bus Clock Enable */
  108. #define APBC_FNCLK (1 << 1) /* Functional Clock Enable */
  109. #define APBC_RST (1 << 2) /* Reset Generation */
  110. /* Functional Clock Selection Mask */
  111. #define APBC_FNCLKSEL(x) (((x) & 0xf) << 4)
  112. #endif /* __ASM_MACH_REGS_APBC_H */