immap.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /*
  2. * ColdFire Internal Memory Map and Defines
  3. *
  4. * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  5. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __IMMAP_H
  26. #define __IMMAP_H
  27. #ifdef CONFIG_M5235
  28. #include <asm/immap_5235.h>
  29. #include <asm/m5235.h>
  30. #define CFG_FEC0_IOBASE (MMAP_FEC)
  31. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  32. /* Timer */
  33. #ifdef CONFIG_MCFTMR
  34. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  35. #define CFG_TMR_BASE (MMAP_DTMR3)
  36. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  37. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  38. #define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
  39. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  40. #define CFG_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
  41. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  42. #endif
  43. #ifdef CONFIG_MCFPIT
  44. #define CFG_UDELAY_BASE (MMAP_PIT0)
  45. #define CFG_PIT_BASE (MMAP_PIT1)
  46. #define CFG_PIT_PRESCALE (6)
  47. #endif
  48. #define CFG_INTR_BASE (MMAP_INTC0)
  49. #define CFG_NUM_IRQS (128)
  50. #endif /* CONFIG_M5235 */
  51. #ifdef CONFIG_M5249
  52. #include <asm/immap_5249.h>
  53. #include <asm/m5249.h>
  54. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  55. #define CFG_INTR_BASE (MMAP_INTC)
  56. #define CFG_NUM_IRQS (64)
  57. /* Timer */
  58. #ifdef CONFIG_MCFTMR
  59. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  60. #define CFG_TMR_BASE (MMAP_DTMR1)
  61. #define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
  62. #define CFG_TMRINTR_NO (31)
  63. #define CFG_TMRINTR_MASK (0x00000400)
  64. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  65. #define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3)
  66. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
  67. #endif
  68. #endif /* CONFIG_M5249 */
  69. #ifdef CONFIG_M5253
  70. #include <asm/immap_5253.h>
  71. #include <asm/m5249.h>
  72. #include <asm/m5253.h>
  73. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  74. #define CFG_INTR_BASE (MMAP_INTC)
  75. #define CFG_NUM_IRQS (64)
  76. /* Timer */
  77. #ifdef CONFIG_MCFTMR
  78. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  79. #define CFG_TMR_BASE (MMAP_DTMR1)
  80. #define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
  81. #define CFG_TMRINTR_NO (27)
  82. #define CFG_TMRINTR_MASK (0x00000400)
  83. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  84. #define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL3 | MCFSIM_ICR_PRI3)
  85. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
  86. #endif
  87. #endif /* CONFIG_M5253 */
  88. #ifdef CONFIG_M5271
  89. #include <asm/immap_5271.h>
  90. #include <asm/m5271.h>
  91. #define CFG_FEC0_IOBASE (MMAP_FEC)
  92. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  93. /* Timer */
  94. #ifdef CONFIG_MCFTMR
  95. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  96. #define CFG_TMR_BASE (MMAP_DTMR3)
  97. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  98. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  99. #define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
  100. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  101. #define CFG_TMRINTR_PRI (0) /* Level must include inorder to work */
  102. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  103. #endif
  104. #define CFG_INTR_BASE (MMAP_INTC0)
  105. #define CFG_NUM_IRQS (128)
  106. #endif /* CONFIG_M5271 */
  107. #ifdef CONFIG_M5272
  108. #include <asm/immap_5272.h>
  109. #include <asm/m5272.h>
  110. #define CFG_FEC0_IOBASE (MMAP_FEC)
  111. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  112. #define CFG_INTR_BASE (MMAP_INTC)
  113. #define CFG_NUM_IRQS (64)
  114. /* Timer */
  115. #ifdef CONFIG_MCFTMR
  116. #define CFG_UDELAY_BASE (MMAP_TMR0)
  117. #define CFG_TMR_BASE (MMAP_TMR3)
  118. #define CFG_TMRPND_REG (((volatile intctrl_t *)(CFG_INTR_BASE))->int_isr)
  119. #define CFG_TMRINTR_NO (INT_TMR3)
  120. #define CFG_TMRINTR_MASK (INT_ISR_INT24)
  121. #define CFG_TMRINTR_PEND (0)
  122. #define CFG_TMRINTR_PRI (INT_ICR1_TMR3PI | INT_ICR1_TMR3IPL(5))
  123. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  124. #endif
  125. #endif /* CONFIG_M5272 */
  126. #ifdef CONFIG_M5282
  127. #include <asm/immap_5282.h>
  128. #include <asm/m5282.h>
  129. #define CFG_FEC0_IOBASE (MMAP_FEC)
  130. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  131. #define CFG_INTR_BASE (MMAP_INTC0)
  132. #define CFG_NUM_IRQS (128)
  133. /* Timer */
  134. #ifdef CONFIG_MCFTMR
  135. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  136. #define CFG_TMR_BASE (MMAP_DTMR3)
  137. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  138. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  139. #define CFG_TMRINTR_MASK (1 << INT0_LO_DTMR3)
  140. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  141. #define CFG_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
  142. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  143. #endif
  144. #endif /* CONFIG_M5282 */
  145. #ifdef CONFIG_M5329
  146. #include <asm/immap_5329.h>
  147. #include <asm/m5329.h>
  148. #define CFG_FEC0_IOBASE (MMAP_FEC)
  149. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
  150. #define CFG_MCFRTC_BASE (MMAP_RTC)
  151. /* Timer */
  152. #ifdef CONFIG_MCFTMR
  153. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  154. #define CFG_TMR_BASE (MMAP_DTMR1)
  155. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  156. #define CFG_TMRINTR_NO (INT0_HI_DTMR1)
  157. #define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
  158. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  159. #define CFG_TMRINTR_PRI (6)
  160. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  161. #endif
  162. #ifdef CONFIG_MCFPIT
  163. #define CFG_UDELAY_BASE (MMAP_PIT0)
  164. #define CFG_PIT_BASE (MMAP_PIT1)
  165. #define CFG_PIT_PRESCALE (6)
  166. #endif
  167. #define CFG_INTR_BASE (MMAP_INTC0)
  168. #define CFG_NUM_IRQS (128)
  169. #endif /* CONFIG_M5329 */
  170. #ifdef CONFIG_M54455
  171. #include <asm/immap_5445x.h>
  172. #include <asm/m5445x.h>
  173. #define CFG_FEC0_IOBASE (MMAP_FEC0)
  174. #define CFG_FEC1_IOBASE (MMAP_FEC1)
  175. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
  176. #define CFG_MCFRTC_BASE (MMAP_RTC)
  177. /* Timer */
  178. #ifdef CONFIG_MCFTMR
  179. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  180. #define CFG_TMR_BASE (MMAP_DTMR1)
  181. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  182. #define CFG_TMRINTR_NO (INT0_HI_DTMR1)
  183. #define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
  184. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  185. #define CFG_TMRINTR_PRI (6)
  186. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  187. #endif
  188. #ifdef CONFIG_MCFPIT
  189. #define CFG_UDELAY_BASE (MMAP_PIT0)
  190. #define CFG_PIT_BASE (MMAP_PIT1)
  191. #define CFG_PIT_PRESCALE (6)
  192. #endif
  193. #define CFG_INTR_BASE (MMAP_INTC0)
  194. #define CFG_NUM_IRQS (128)
  195. #ifdef CONFIG_PCI
  196. #define CFG_PCI_BAR0 CFG_SDRAM_BASE
  197. #define CFG_PCI_BAR4 CFG_SDRAM_BASE
  198. #define CFG_PCI_TBATR0 (CFG_SDRAM_BASE)
  199. #define CFG_PCI_TBATR4 (CFG_SDRAM_BASE)
  200. #endif
  201. #endif /* CONFIG_M54455 */
  202. #endif /* __IMMAP_H */