regs-apbc.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_SSP1 APBC_REG(0x01c)
  26. #define APBC_PXA168_SSP2 APBC_REG(0x020)
  27. #define APBC_PXA168_RTC APBC_REG(0x028)
  28. #define APBC_PXA168_TWSI0 APBC_REG(0x02c)
  29. #define APBC_PXA168_KPC APBC_REG(0x030)
  30. #define APBC_PXA168_TIMERS APBC_REG(0x034)
  31. #define APBC_PXA168_AIB APBC_REG(0x03c)
  32. #define APBC_PXA168_SW_JTAG APBC_REG(0x040)
  33. #define APBC_PXA168_ONEWIRE APBC_REG(0x048)
  34. #define APBC_PXA168_SSP3 APBC_REG(0x04c)
  35. #define APBC_PXA168_ASFAR APBC_REG(0x050)
  36. #define APBC_PXA168_ASSAR APBC_REG(0x054)
  37. #define APBC_PXA168_SSP4 APBC_REG(0x058)
  38. #define APBC_PXA168_SSP5 APBC_REG(0x05c)
  39. #define APBC_PXA168_TWSI1 APBC_REG(0x06c)
  40. #define APBC_PXA168_UART3 APBC_REG(0x070)
  41. #define APBC_PXA168_AC97 APBC_REG(0x084)
  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. /* Common APB clock register bit definitions */
  67. #define APBC_APBCLK (1 << 0) /* APB Bus Clock Enable */
  68. #define APBC_FNCLK (1 << 1) /* Functional Clock Enable */
  69. #define APBC_RST (1 << 2) /* Reset Generation */
  70. /* Functional Clock Selection Mask */
  71. #define APBC_FNCLKSEL(x) (((x) & 0xf) << 4)
  72. #endif /* __ASM_MACH_REGS_APBC_H */