iop331.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. /*
  2. * linux/include/asm/arch-iop33x/iop331.h
  3. *
  4. * Intel IOP331 Chip definitions
  5. *
  6. * Author: Dave Jiang (dave.jiang@intel.com)
  7. * Copyright (C) 2003, 2004 Intel Corp.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef _IOP331_HW_H_
  14. #define _IOP331_HW_H_
  15. /*
  16. * This is needed for mixed drivers that need to work on all
  17. * IOP3xx variants but behave slightly differently on each.
  18. */
  19. #ifndef __ASSEMBLY__
  20. #define iop_is_331() 1
  21. #endif
  22. /*
  23. * IOP331 chipset registers
  24. */
  25. #define IOP331_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/
  26. #define IOP331_PHYS_MEM_BASE 0xffffe000 /* chip physical memory address */
  27. #define IOP331_REG_ADDR(reg) (IOP331_VIRT_MEM_BASE | (reg))
  28. /* Reserved 0x00000000 through 0x000000FF */
  29. /* Address Translation Unit 0x00000100 through 0x000001FF */
  30. /* Messaging Unit 0x00000300 through 0x000003FF */
  31. /* Reserved 0x00000300 through 0x0000030c */
  32. #define IOP331_IMR0 (volatile u32 *)IOP331_REG_ADDR(0x00000310)
  33. #define IOP331_IMR1 (volatile u32 *)IOP331_REG_ADDR(0x00000314)
  34. #define IOP331_OMR0 (volatile u32 *)IOP331_REG_ADDR(0x00000318)
  35. #define IOP331_OMR1 (volatile u32 *)IOP331_REG_ADDR(0x0000031C)
  36. #define IOP331_IDR (volatile u32 *)IOP331_REG_ADDR(0x00000320)
  37. #define IOP331_IISR (volatile u32 *)IOP331_REG_ADDR(0x00000324)
  38. #define IOP331_IIMR (volatile u32 *)IOP331_REG_ADDR(0x00000328)
  39. #define IOP331_ODR (volatile u32 *)IOP331_REG_ADDR(0x0000032C)
  40. #define IOP331_OISR (volatile u32 *)IOP331_REG_ADDR(0x00000330)
  41. #define IOP331_OIMR (volatile u32 *)IOP331_REG_ADDR(0x00000334)
  42. /* Reserved 0x00000338 through 0x0000034F */
  43. #define IOP331_MUCR (volatile u32 *)IOP331_REG_ADDR(0x00000350)
  44. #define IOP331_QBAR (volatile u32 *)IOP331_REG_ADDR(0x00000354)
  45. /* Reserved 0x00000358 through 0x0000035C */
  46. #define IOP331_IFHPR (volatile u32 *)IOP331_REG_ADDR(0x00000360)
  47. #define IOP331_IFTPR (volatile u32 *)IOP331_REG_ADDR(0x00000364)
  48. #define IOP331_IPHPR (volatile u32 *)IOP331_REG_ADDR(0x00000368)
  49. #define IOP331_IPTPR (volatile u32 *)IOP331_REG_ADDR(0x0000036C)
  50. #define IOP331_OFHPR (volatile u32 *)IOP331_REG_ADDR(0x00000370)
  51. #define IOP331_OFTPR (volatile u32 *)IOP331_REG_ADDR(0x00000374)
  52. #define IOP331_OPHPR (volatile u32 *)IOP331_REG_ADDR(0x00000378)
  53. #define IOP331_OPTPR (volatile u32 *)IOP331_REG_ADDR(0x0000037C)
  54. #define IOP331_IAR (volatile u32 *)IOP331_REG_ADDR(0x00000380)
  55. /* Reserved 0x00000384 through 0x000003FF */
  56. /* DMA Controller 0x00000400 through 0x000004FF */
  57. #define IOP331_DMA0_CCR (volatile u32 *)IOP331_REG_ADDR(0x00000400)
  58. #define IOP331_DMA0_CSR (volatile u32 *)IOP331_REG_ADDR(0x00000404)
  59. #define IOP331_DMA0_DAR (volatile u32 *)IOP331_REG_ADDR(0x0000040C)
  60. #define IOP331_DMA0_NDAR (volatile u32 *)IOP331_REG_ADDR(0x00000410)
  61. #define IOP331_DMA0_PADR (volatile u32 *)IOP331_REG_ADDR(0x00000414)
  62. #define IOP331_DMA0_PUADR (volatile u32 *)IOP331_REG_ADDR(0x00000418)
  63. #define IOP331_DMA0_LADR (volatile u32 *)IOP331_REG_ADDR(0X0000041C)
  64. #define IOP331_DMA0_BCR (volatile u32 *)IOP331_REG_ADDR(0x00000420)
  65. #define IOP331_DMA0_DCR (volatile u32 *)IOP331_REG_ADDR(0x00000424)
  66. /* Reserved 0x00000428 through 0x0000043C */
  67. #define IOP331_DMA1_CCR (volatile u32 *)IOP331_REG_ADDR(0x00000440)
  68. #define IOP331_DMA1_CSR (volatile u32 *)IOP331_REG_ADDR(0x00000444)
  69. #define IOP331_DMA1_DAR (volatile u32 *)IOP331_REG_ADDR(0x0000044C)
  70. #define IOP331_DMA1_NDAR (volatile u32 *)IOP331_REG_ADDR(0x00000450)
  71. #define IOP331_DMA1_PADR (volatile u32 *)IOP331_REG_ADDR(0x00000454)
  72. #define IOP331_DMA1_PUADR (volatile u32 *)IOP331_REG_ADDR(0x00000458)
  73. #define IOP331_DMA1_LADR (volatile u32 *)IOP331_REG_ADDR(0x0000045C)
  74. #define IOP331_DMA1_BCR (volatile u32 *)IOP331_REG_ADDR(0x00000460)
  75. #define IOP331_DMA1_DCR (volatile u32 *)IOP331_REG_ADDR(0x00000464)
  76. /* Reserved 0x00000468 through 0x000004FF */
  77. /* Memory controller 0x00000500 through 0x0005FF */
  78. /* Peripheral bus interface unit 0x00000680 through 0x0006FF */
  79. #define IOP331_PBCR (volatile u32 *)IOP331_REG_ADDR(0x00000680)
  80. #define IOP331_PBISR (volatile u32 *)IOP331_REG_ADDR(0x00000684)
  81. #define IOP331_PBBAR0 (volatile u32 *)IOP331_REG_ADDR(0x00000688)
  82. #define IOP331_PBLR0 (volatile u32 *)IOP331_REG_ADDR(0x0000068C)
  83. #define IOP331_PBBAR1 (volatile u32 *)IOP331_REG_ADDR(0x00000690)
  84. #define IOP331_PBLR1 (volatile u32 *)IOP331_REG_ADDR(0x00000694)
  85. #define IOP331_PBBAR2 (volatile u32 *)IOP331_REG_ADDR(0x00000698)
  86. #define IOP331_PBLR2 (volatile u32 *)IOP331_REG_ADDR(0x0000069C)
  87. #define IOP331_PBBAR3 (volatile u32 *)IOP331_REG_ADDR(0x000006A0)
  88. #define IOP331_PBLR3 (volatile u32 *)IOP331_REG_ADDR(0x000006A4)
  89. #define IOP331_PBBAR4 (volatile u32 *)IOP331_REG_ADDR(0x000006A8)
  90. #define IOP331_PBLR4 (volatile u32 *)IOP331_REG_ADDR(0x000006AC)
  91. #define IOP331_PBBAR5 (volatile u32 *)IOP331_REG_ADDR(0x000006B0)
  92. #define IOP331_PBLR5 (volatile u32 *)IOP331_REG_ADDR(0x000006B4)
  93. #define IOP331_PBDSCR (volatile u32 *)IOP331_REG_ADDR(0x000006B8)
  94. /* Reserved 0x000006BC */
  95. #define IOP331_PMBR0 (volatile u32 *)IOP331_REG_ADDR(0x000006C0)
  96. /* Reserved 0x000006C4 through 0x000006DC */
  97. #define IOP331_PMBR1 (volatile u32 *)IOP331_REG_ADDR(0x000006E0)
  98. #define IOP331_PMBR2 (volatile u32 *)IOP331_REG_ADDR(0x000006E4)
  99. #define IOP331_PBCR_EN 0x1
  100. #define IOP331_PBISR_BOOR_ERR 0x1
  101. /* Peripheral performance monitoring unit 0x00000700 through 0x00077F */
  102. /* Internal arbitration unit 0x00000780 through 0x0007BF */
  103. /* Interrupt Controller */
  104. #define IOP331_INTCTL0 (volatile u32 *)IOP331_REG_ADDR(0x00000790)
  105. #define IOP331_INTCTL1 (volatile u32 *)IOP331_REG_ADDR(0x00000794)
  106. #define IOP331_INTSTR0 (volatile u32 *)IOP331_REG_ADDR(0x00000798)
  107. #define IOP331_INTSTR1 (volatile u32 *)IOP331_REG_ADDR(0x0000079C)
  108. #define IOP331_IINTSRC0 (volatile u32 *)IOP331_REG_ADDR(0x000007A0)
  109. #define IOP331_IINTSRC1 (volatile u32 *)IOP331_REG_ADDR(0x000007A4)
  110. #define IOP331_FINTSRC0 (volatile u32 *)IOP331_REG_ADDR(0x000007A8)
  111. #define IOP331_FINTSRC1 (volatile u32 *)IOP331_REG_ADDR(0x000007AC)
  112. #define IOP331_IPR0 (volatile u32 *)IOP331_REG_ADDR(0x000007B0)
  113. #define IOP331_IPR1 (volatile u32 *)IOP331_REG_ADDR(0x000007B4)
  114. #define IOP331_IPR2 (volatile u32 *)IOP331_REG_ADDR(0x000007B8)
  115. #define IOP331_IPR3 (volatile u32 *)IOP331_REG_ADDR(0x000007BC)
  116. #define IOP331_INTBASE (volatile u32 *)IOP331_REG_ADDR(0x000007C0)
  117. #define IOP331_INTSIZE (volatile u32 *)IOP331_REG_ADDR(0x000007C4)
  118. #define IOP331_IINTVEC (volatile u32 *)IOP331_REG_ADDR(0x000007C8)
  119. #define IOP331_FINTVEC (volatile u32 *)IOP331_REG_ADDR(0x000007CC)
  120. /* Application accelerator unit 0x00000800 - 0x000008FF */
  121. #define IOP331_AAU_ACR (volatile u32 *)IOP331_REG_ADDR(0x00000800)
  122. #define IOP331_AAU_ASR (volatile u32 *)IOP331_REG_ADDR(0x00000804)
  123. #define IOP331_AAU_ADAR (volatile u32 *)IOP331_REG_ADDR(0x00000808)
  124. #define IOP331_AAU_ANDAR (volatile u32 *)IOP331_REG_ADDR(0x0000080C)
  125. #define IOP331_AAU_SAR1 (volatile u32 *)IOP331_REG_ADDR(0x00000810)
  126. #define IOP331_AAU_SAR2 (volatile u32 *)IOP331_REG_ADDR(0x00000814)
  127. #define IOP331_AAU_SAR3 (volatile u32 *)IOP331_REG_ADDR(0x00000818)
  128. #define IOP331_AAU_SAR4 (volatile u32 *)IOP331_REG_ADDR(0x0000081C)
  129. #define IOP331_AAU_SAR5 (volatile u32 *)IOP331_REG_ADDR(0x0000082C)
  130. #define IOP331_AAU_SAR6 (volatile u32 *)IOP331_REG_ADDR(0x00000830)
  131. #define IOP331_AAU_SAR7 (volatile u32 *)IOP331_REG_ADDR(0x00000834)
  132. #define IOP331_AAU_SAR8 (volatile u32 *)IOP331_REG_ADDR(0x00000838)
  133. #define IOP331_AAU_SAR9 (volatile u32 *)IOP331_REG_ADDR(0x00000840)
  134. #define IOP331_AAU_SAR10 (volatile u32 *)IOP331_REG_ADDR(0x00000844)
  135. #define IOP331_AAU_SAR11 (volatile u32 *)IOP331_REG_ADDR(0x00000848)
  136. #define IOP331_AAU_SAR12 (volatile u32 *)IOP331_REG_ADDR(0x0000084C)
  137. #define IOP331_AAU_SAR13 (volatile u32 *)IOP331_REG_ADDR(0x00000850)
  138. #define IOP331_AAU_SAR14 (volatile u32 *)IOP331_REG_ADDR(0x00000854)
  139. #define IOP331_AAU_SAR15 (volatile u32 *)IOP331_REG_ADDR(0x00000858)
  140. #define IOP331_AAU_SAR16 (volatile u32 *)IOP331_REG_ADDR(0x0000085C)
  141. #define IOP331_AAU_SAR17 (volatile u32 *)IOP331_REG_ADDR(0x00000864)
  142. #define IOP331_AAU_SAR18 (volatile u32 *)IOP331_REG_ADDR(0x00000868)
  143. #define IOP331_AAU_SAR19 (volatile u32 *)IOP331_REG_ADDR(0x0000086C)
  144. #define IOP331_AAU_SAR20 (volatile u32 *)IOP331_REG_ADDR(0x00000870)
  145. #define IOP331_AAU_SAR21 (volatile u32 *)IOP331_REG_ADDR(0x00000874)
  146. #define IOP331_AAU_SAR22 (volatile u32 *)IOP331_REG_ADDR(0x00000878)
  147. #define IOP331_AAU_SAR23 (volatile u32 *)IOP331_REG_ADDR(0x0000087C)
  148. #define IOP331_AAU_SAR24 (volatile u32 *)IOP331_REG_ADDR(0x00000880)
  149. #define IOP331_AAU_SAR25 (volatile u32 *)IOP331_REG_ADDR(0x00000888)
  150. #define IOP331_AAU_SAR26 (volatile u32 *)IOP331_REG_ADDR(0x0000088C)
  151. #define IOP331_AAU_SAR27 (volatile u32 *)IOP331_REG_ADDR(0x00000890)
  152. #define IOP331_AAU_SAR28 (volatile u32 *)IOP331_REG_ADDR(0x00000894)
  153. #define IOP331_AAU_SAR29 (volatile u32 *)IOP331_REG_ADDR(0x00000898)
  154. #define IOP331_AAU_SAR30 (volatile u32 *)IOP331_REG_ADDR(0x0000089C)
  155. #define IOP331_AAU_SAR31 (volatile u32 *)IOP331_REG_ADDR(0x000008A0)
  156. #define IOP331_AAU_SAR32 (volatile u32 *)IOP331_REG_ADDR(0x000008A4)
  157. #define IOP331_AAU_DAR (volatile u32 *)IOP331_REG_ADDR(0x00000820)
  158. #define IOP331_AAU_ABCR (volatile u32 *)IOP331_REG_ADDR(0x00000824)
  159. #define IOP331_AAU_ADCR (volatile u32 *)IOP331_REG_ADDR(0x00000828)
  160. #define IOP331_AAU_EDCR0 (volatile u32 *)IOP331_REG_ADDR(0x0000083c)
  161. #define IOP331_AAU_EDCR1 (volatile u32 *)IOP331_REG_ADDR(0x00000860)
  162. #define IOP331_AAU_EDCR2 (volatile u32 *)IOP331_REG_ADDR(0x00000884)
  163. #define IOP331_SPDSCR (volatile u32 *)IOP331_REG_ADDR(0x000015C0)
  164. #define IOP331_PPDSCR (volatile u32 *)IOP331_REG_ADDR(0x000015C8)
  165. /* SSP serial port unit 0x00001600 - 0x0000167F */
  166. /* I2C bus interface unit 0x00001680 - 0x000016FF */
  167. /* 0x00001700 through 0x0000172C UART 0 */
  168. /* Reserved 0x00001730 through 0x0000173F */
  169. /* 0x00001740 through 0x0000176C UART 1 */
  170. #define IOP331_UART0_PHYS (IOP331_PHYS_MEM_BASE | 0x00001700) /* UART #1 physical */
  171. #define IOP331_UART1_PHYS (IOP331_PHYS_MEM_BASE | 0x00001740) /* UART #2 physical */
  172. #define IOP331_UART0_VIRT (IOP331_VIRT_MEM_BASE | 0x00001700) /* UART #1 virtual addr */
  173. #define IOP331_UART1_VIRT (IOP331_VIRT_MEM_BASE | 0x00001740) /* UART #2 virtual addr */
  174. /* Reserved 0x00001770 through 0x0000177F */
  175. /* General Purpose I/O Registers */
  176. #define IOP331_GPOE (volatile u32 *)IOP331_REG_ADDR(0x00001780)
  177. #define IOP331_GPID (volatile u32 *)IOP331_REG_ADDR(0x00001784)
  178. #define IOP331_GPOD (volatile u32 *)IOP331_REG_ADDR(0x00001788)
  179. /* Reserved 0x0000178c through 0x000019ff */
  180. /*
  181. * Peripherals that are shared between the iop32x and iop33x but
  182. * located at different addresses.
  183. */
  184. #define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780 + (reg))
  185. #define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07d0 + (reg))
  186. #include <asm/hardware/iop3xx.h>
  187. #ifndef __ASSEMBLY__
  188. extern void iop331_init_irq(void);
  189. extern void iop331_time_init(void);
  190. #endif
  191. #endif // _IOP331_HW_H_