ibmstb4.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /*
  2. * Author: Armin Kuster <akuster@mvista.com>
  3. *
  4. * 2001 (c) MontaVista, Software, Inc. This file is licensed under
  5. * the terms of the GNU General Public License version 2. This program
  6. * is licensed "as is" without any warranty of any kind, whether express
  7. * or implied.
  8. */
  9. #ifdef __KERNEL__
  10. #ifndef __ASM_IBMSTB4_H__
  11. #define __ASM_IBMSTB4_H__
  12. /* serial port defines */
  13. #define STB04xxx_IO_BASE ((uint)0xe0000000)
  14. #define PPC4xx_PCI_IO_ADDR STB04xxx_IO_BASE
  15. #define PPC4xx_ONB_IO_PADDR STB04xxx_IO_BASE
  16. #define PPC4xx_ONB_IO_VADDR ((uint)0xe0000000)
  17. #define PPC4xx_ONB_IO_SIZE ((uint)14*64*1024)
  18. /*
  19. * map STB04xxx internal i/o address (0x400x00xx) to an address
  20. * which is below the 2GB limit...
  21. *
  22. * 4000 000x uart1 -> 0xe000 000x
  23. * 4001 00xx ppu
  24. * 4002 00xx smart card
  25. * 4003 000x iic
  26. * 4004 000x uart0
  27. * 4005 0xxx timer
  28. * 4006 00xx gpio
  29. * 4007 00xx smart card
  30. * 400b 000x iic
  31. * 400c 000x scp
  32. * 400d 000x modem
  33. * 400e 000x uart2
  34. */
  35. #define STB04xxx_MAP_IO_ADDR(a) (((uint)(a)) + (STB04xxx_IO_BASE - 0x40000000))
  36. #define RS_TABLE_SIZE 3
  37. #define UART0_INT 20
  38. #ifdef __BOOTER__
  39. #define UART0_IO_BASE 0x40040000
  40. #else
  41. #define UART0_IO_BASE 0xe0040000
  42. #endif
  43. #define UART1_INT 21
  44. #ifdef __BOOTER__
  45. #define UART1_IO_BASE 0x40000000
  46. #else
  47. #define UART1_IO_BASE 0xe0000000
  48. #endif
  49. #define UART2_INT 31
  50. #ifdef __BOOTER__
  51. #define UART2_IO_BASE 0x400e0000
  52. #else
  53. #define UART2_IO_BASE 0xe00e0000
  54. #endif
  55. #define IDE0_BASE 0x400F0000
  56. #define IDE0_SIZE 0x200
  57. #define IDE0_IRQ 25
  58. #define IIC0_BASE 0x40030000
  59. #define IIC1_BASE 0x400b0000
  60. #define OPB0_BASE 0x40000000
  61. #define GPIO0_BASE 0x40060000
  62. #define USB0_BASE 0x40010000
  63. #define USB0_SIZE 0xA0
  64. #define USB0_IRQ 18
  65. #define IIC_NUMS 2
  66. #define UART_NUMS 3
  67. #define IIC0_IRQ 9
  68. #define IIC1_IRQ 10
  69. #define IIC_OWN 0x55
  70. #define IIC_CLOCK 50
  71. #define BD_EMAC_ADDR(e,i) bi_enetaddr[i]
  72. #define STD_UART_OP(num) \
  73. { 0, BASE_BAUD, 0, UART##num##_INT, \
  74. (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
  75. iomem_base: (u8 *)UART##num##_IO_BASE, \
  76. io_type: SERIAL_IO_MEM},
  77. #if defined(CONFIG_UART0_TTYS0)
  78. #define SERIAL_DEBUG_IO_BASE UART0_IO_BASE
  79. #define SERIAL_PORT_DFNS \
  80. STD_UART_OP(0) \
  81. STD_UART_OP(1) \
  82. STD_UART_OP(2)
  83. #endif
  84. #if defined(CONFIG_UART0_TTYS1)
  85. #define SERIAL_DEBUG_IO_BASE UART2_IO_BASE
  86. #define SERIAL_PORT_DFNS \
  87. STD_UART_OP(1) \
  88. STD_UART_OP(0) \
  89. STD_UART_OP(2)
  90. #endif
  91. #if defined(CONFIG_UART0_TTYS2)
  92. #define SERIAL_DEBUG_IO_BASE UART2_IO_BASE
  93. #define SERIAL_PORT_DFNS \
  94. STD_UART_OP(2) \
  95. STD_UART_OP(0) \
  96. STD_UART_OP(1)
  97. #endif
  98. #define DCRN_BE_BASE 0x090
  99. #define DCRN_DMA0_BASE 0x0C0
  100. #define DCRN_DMA1_BASE 0x0C8
  101. #define DCRN_DMA2_BASE 0x0D0
  102. #define DCRN_DMA3_BASE 0x0D8
  103. #define DCRNCAP_DMA_CC 1 /* have DMA chained count capability */
  104. #define DCRN_DMASR_BASE 0x0E0
  105. #define DCRN_PLB0_BASE 0x054
  106. #define DCRN_PLB1_BASE 0x064
  107. #define DCRN_POB0_BASE 0x0B0
  108. #define DCRN_SCCR_BASE 0x120
  109. #define DCRN_UIC0_BASE 0x040
  110. #define DCRN_BE_BASE 0x090
  111. #define DCRN_DMA0_BASE 0x0C0
  112. #define DCRN_DMA1_BASE 0x0C8
  113. #define DCRN_DMA2_BASE 0x0D0
  114. #define DCRN_DMA3_BASE 0x0D8
  115. #define DCRN_CIC_BASE 0x030
  116. #define DCRN_DMASR_BASE 0x0E0
  117. #define DCRN_EBIMC_BASE 0x070
  118. #define DCRN_DCRX_BASE 0x020
  119. #define DCRN_CPMFR_BASE 0x102
  120. #define DCRN_SCCR_BASE 0x120
  121. #define UIC0 DCRN_UIC0_BASE
  122. #define IBM_CPM_IIC0 0x80000000 /* IIC 0 interface */
  123. #define IBM_CPM_USB0 0x40000000 /* IEEE-1284 */
  124. #define IBM_CPM_IIC1 0x20000000 /* IIC 1 interface */
  125. #define IBM_CPM_CPU 0x10000000 /* PPC405B3 clock control */
  126. #define IBM_CPM_AUD 0x08000000 /* Audio Decoder */
  127. #define IBM_CPM_EBIU 0x04000000 /* External Bus Interface Unit */
  128. #define IBM_CPM_SDRAM1 0x02000000 /* SDRAM 1 memory controller */
  129. #define IBM_CPM_DMA 0x01000000 /* DMA controller */
  130. #define IBM_CPM_DMA1 0x00800000 /* reserved */
  131. #define IBM_CPM_XPT1 0x00400000 /* reserved */
  132. #define IBM_CPM_XPT2 0x00200000 /* reserved */
  133. #define IBM_CPM_UART1 0x00100000 /* Serial 1 / Infrared */
  134. #define IBM_CPM_UART0 0x00080000 /* Serial 0 / 16550 */
  135. #define IBM_CPM_EPI 0x00040000 /* DCR Extension */
  136. #define IBM_CPM_SC0 0x00020000 /* Smart Card 0 */
  137. #define IBM_CPM_VID 0x00010000 /* reserved */
  138. #define IBM_CPM_SC1 0x00008000 /* Smart Card 1 */
  139. #define IBM_CPM_USBSDRA 0x00004000 /* SDRAM 0 memory controller */
  140. #define IBM_CPM_XPT0 0x00002000 /* Transport - 54 Mhz */
  141. #define IBM_CPM_CBS 0x00001000 /* Cross Bar Switch */
  142. #define IBM_CPM_GPT 0x00000800 /* GPTPWM */
  143. #define IBM_CPM_GPIO0 0x00000400 /* General Purpose IO 0 */
  144. #define IBM_CPM_DENC 0x00000200 /* Digital video Encoder */
  145. #define IBM_CPM_TMRCLK 0x00000100 /* CPU timers */
  146. #define IBM_CPM_XPT27 0x00000080 /* Transport - 27 Mhz */
  147. #define IBM_CPM_UIC 0x00000040 /* Universal Interrupt Controller */
  148. #define IBM_CPM_SSP 0x00000010 /* Modem Serial Interface (SSP) */
  149. #define IBM_CPM_UART2 0x00000008 /* Serial Control Port */
  150. #define IBM_CPM_DDIO 0x00000004 /* Descrambler */
  151. #define IBM_CPM_VID2 0x00000002 /* Video Decoder clock domain 2 */
  152. #define DFLT_IBM4xx_PM ~(IBM_CPM_CPU | IBM_CPM_EBIU | IBM_CPM_SDRAM1 \
  153. | IBM_CPM_DMA | IBM_CPM_DMA1 | IBM_CPM_CBS \
  154. | IBM_CPM_USBSDRA | IBM_CPM_XPT0 | IBM_CPM_TMRCLK \
  155. | IBM_CPM_XPT27 | IBM_CPM_UIC )
  156. #define DCRN_BEAR (DCRN_BE_BASE + 0x0) /* Bus Error Address Register */
  157. #define DCRN_BESR (DCRN_BE_BASE + 0x1) /* Bus Error Syndrome Register */
  158. /* DCRN_BESR */
  159. #define BESR_DSES 0x80000000 /* Data-Side Error Status */
  160. #define BESR_DMES 0x40000000 /* DMA Error Status */
  161. #define BESR_RWS 0x20000000 /* Read/Write Status */
  162. #define BESR_ETMASK 0x1C000000 /* Error Type */
  163. #define ET_PROT 0
  164. #define ET_PARITY 1
  165. #define ET_NCFG 2
  166. #define ET_BUSERR 4
  167. #define ET_BUSTO 6
  168. #define CHR1_CETE 0x00800000 /* CPU external timer enable */
  169. #define CHR1_PCIPW 0x00008000 /* PCI Int enable/Peripheral Write enable */
  170. #define DCRN_CICCR (DCRN_CIC_BASE + 0x0) /* CIC Control Register */
  171. #define DCRN_DMAS1 (DCRN_CIC_BASE + 0x1) /* DMA Select1 Register */
  172. #define DCRN_DMAS2 (DCRN_CIC_BASE + 0x2) /* DMA Select2 Register */
  173. #define DCRN_CICVCR (DCRN_CIC_BASE + 0x3) /* CIC Video COntro Register */
  174. #define DCRN_CICSEL3 (DCRN_CIC_BASE + 0x5) /* CIC Select 3 Register */
  175. #define DCRN_SGPO (DCRN_CIC_BASE + 0x6) /* CIC GPIO Output Register */
  176. #define DCRN_SGPOD (DCRN_CIC_BASE + 0x7) /* CIC GPIO OD Register */
  177. #define DCRN_SGPTC (DCRN_CIC_BASE + 0x8) /* CIC GPIO Tristate Ctrl Reg */
  178. #define DCRN_SGPI (DCRN_CIC_BASE + 0x9) /* CIC GPIO Input Reg */
  179. #define DCRN_DCRXICR (DCRN_DCRX_BASE + 0x0) /* Internal Control Register */
  180. #define DCRN_DCRXISR (DCRN_DCRX_BASE + 0x1) /* Internal Status Register */
  181. #define DCRN_DCRXECR (DCRN_DCRX_BASE + 0x2) /* External Control Register */
  182. #define DCRN_DCRXESR (DCRN_DCRX_BASE + 0x3) /* External Status Register */
  183. #define DCRN_DCRXTAR (DCRN_DCRX_BASE + 0x4) /* Target Address Register */
  184. #define DCRN_DCRXTDR (DCRN_DCRX_BASE + 0x5) /* Target Data Register */
  185. #define DCRN_DCRXIGR (DCRN_DCRX_BASE + 0x6) /* Interrupt Generation Register */
  186. #define DCRN_DCRXBCR (DCRN_DCRX_BASE + 0x7) /* Line Buffer Control Register */
  187. #define DCRN_BRCRH0 (DCRN_EBIMC_BASE + 0x0) /* Bus Region Config High 0 */
  188. #define DCRN_BRCRH1 (DCRN_EBIMC_BASE + 0x1) /* Bus Region Config High 1 */
  189. #define DCRN_BRCRH2 (DCRN_EBIMC_BASE + 0x2) /* Bus Region Config High 2 */
  190. #define DCRN_BRCRH3 (DCRN_EBIMC_BASE + 0x3) /* Bus Region Config High 3 */
  191. #define DCRN_BRCRH4 (DCRN_EBIMC_BASE + 0x4) /* Bus Region Config High 4 */
  192. #define DCRN_BRCRH5 (DCRN_EBIMC_BASE + 0x5) /* Bus Region Config High 5 */
  193. #define DCRN_BRCRH6 (DCRN_EBIMC_BASE + 0x6) /* Bus Region Config High 6 */
  194. #define DCRN_BRCRH7 (DCRN_EBIMC_BASE + 0x7) /* Bus Region Config High 7 */
  195. #define DCRN_BRCR0 (DCRN_EBIMC_BASE + 0x10) /* BRC 0 */
  196. #define DCRN_BRCR1 (DCRN_EBIMC_BASE + 0x11) /* BRC 1 */
  197. #define DCRN_BRCR2 (DCRN_EBIMC_BASE + 0x12) /* BRC 2 */
  198. #define DCRN_BRCR3 (DCRN_EBIMC_BASE + 0x13) /* BRC 3 */
  199. #define DCRN_BRCR4 (DCRN_EBIMC_BASE + 0x14) /* BRC 4 */
  200. #define DCRN_BRCR5 (DCRN_EBIMC_BASE + 0x15) /* BRC 5 */
  201. #define DCRN_BRCR6 (DCRN_EBIMC_BASE + 0x16) /* BRC 6 */
  202. #define DCRN_BRCR7 (DCRN_EBIMC_BASE + 0x17) /* BRC 7 */
  203. #define DCRN_BEAR0 (DCRN_EBIMC_BASE + 0x20) /* Bus Error Address Register */
  204. #define DCRN_BESR0 (DCRN_EBIMC_BASE + 0x21) /* Bus Error Status Register */
  205. #define DCRN_BIUCR (DCRN_EBIMC_BASE + 0x2A) /* Bus Interfac Unit Ctrl Reg */
  206. #include <asm/ibm405.h>
  207. #endif /* __ASM_IBMSTB4_H__ */
  208. #endif /* __KERNEL__ */