immap.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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_M5249
  28. #include <asm/immap_5249.h>
  29. #include <asm/m5249.h>
  30. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  31. #define CFG_INTR_BASE (MMAP_INTC)
  32. #define CFG_NUM_IRQS (64)
  33. /* Timer */
  34. #ifdef CONFIG_MCFTMR
  35. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  36. #define CFG_TMR_BASE (MMAP_DTMR1)
  37. #define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
  38. #define CFG_TMRINTR_NO (31)
  39. #define CFG_TMRINTR_MASK (0x00000400)
  40. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  41. #define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3)
  42. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
  43. #endif
  44. #endif /* CONFIG_M5249 */
  45. #ifdef CONFIG_M5253
  46. #include <asm/immap_5253.h>
  47. #include <asm/m5249.h>
  48. #include <asm/m5253.h>
  49. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  50. #define CFG_INTR_BASE (MMAP_INTC)
  51. #define CFG_NUM_IRQS (64)
  52. /* Timer */
  53. #ifdef CONFIG_MCFTMR
  54. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  55. #define CFG_TMR_BASE (MMAP_DTMR1)
  56. #define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
  57. #define CFG_TMRINTR_NO (27)
  58. #define CFG_TMRINTR_MASK (0x00000400)
  59. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  60. #define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL3 | MCFSIM_ICR_PRI3)
  61. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
  62. #endif
  63. #endif /* CONFIG_M5253 */
  64. #ifdef CONFIG_M5271
  65. #include <asm/immap_5271.h>
  66. #include <asm/m5271.h>
  67. #define CFG_FEC0_IOBASE (MMAP_FEC)
  68. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  69. /* Timer */
  70. #ifdef CONFIG_MCFTMR
  71. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  72. #define CFG_TMR_BASE (MMAP_DTMR3)
  73. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  74. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  75. #define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
  76. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  77. #define CFG_TMRINTR_PRI (0) /* Level must include inorder to work */
  78. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  79. #endif
  80. #define CFG_INTR_BASE (MMAP_INTC0)
  81. #define CFG_NUM_IRQS (128)
  82. #endif /* CONFIG_M5271 */
  83. #ifdef CONFIG_M5272
  84. #include <asm/immap_5272.h>
  85. #include <asm/m5272.h>
  86. #define CFG_FEC0_IOBASE (MMAP_FEC)
  87. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  88. #define CFG_INTR_BASE (MMAP_INTC)
  89. #define CFG_NUM_IRQS (64)
  90. /* Timer */
  91. #ifdef CONFIG_MCFTMR
  92. #define CFG_UDELAY_BASE (MMAP_TMR0)
  93. #define CFG_TMR_BASE (MMAP_TMR3)
  94. #define CFG_TMRPND_REG (((volatile intctrl_t *)(CFG_INTR_BASE))->int_isr)
  95. #define CFG_TMRINTR_NO (INT_TMR3)
  96. #define CFG_TMRINTR_MASK (INT_ISR_INT24)
  97. #define CFG_TMRINTR_PEND (0)
  98. #define CFG_TMRINTR_PRI (INT_ICR1_TMR3PI | INT_ICR1_TMR3IPL(5))
  99. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  100. #endif
  101. #endif /* CONFIG_M5272 */
  102. #ifdef CONFIG_M5282
  103. #include <asm/immap_5282.h>
  104. #include <asm/m5282.h>
  105. #define CFG_FEC0_IOBASE (MMAP_FEC)
  106. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  107. #define CFG_INTR_BASE (MMAP_INTC0)
  108. #define CFG_NUM_IRQS (128)
  109. /* Timer */
  110. #ifdef CONFIG_MCFTMR
  111. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  112. #define CFG_TMR_BASE (MMAP_DTMR3)
  113. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  114. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  115. #define CFG_TMRINTR_MASK (1 << INT0_LO_DTMR3)
  116. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  117. #define CFG_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
  118. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  119. #endif
  120. #endif /* CONFIG_M5282 */
  121. #ifdef CONFIG_M5329
  122. #include <asm/immap_5329.h>
  123. #include <asm/m5329.h>
  124. #define CFG_FEC0_IOBASE (MMAP_FEC)
  125. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
  126. #define CFG_MCFRTC_BASE (MMAP_RTC)
  127. /* Timer */
  128. #ifdef CONFIG_MCFTMR
  129. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  130. #define CFG_TMR_BASE (MMAP_DTMR1)
  131. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  132. #define CFG_TMRINTR_NO (INT0_HI_DTMR1)
  133. #define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
  134. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  135. #define CFG_TMRINTR_PRI (6)
  136. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  137. #endif
  138. #ifdef CONFIG_MCFPIT
  139. #define CFG_UDELAY_BASE (MMAP_PIT0)
  140. #define CFG_PIT_BASE (MMAP_PIT1)
  141. #define CFG_PIT_PRESCALE (6)
  142. #endif
  143. #define CFG_INTR_BASE (MMAP_INTC0)
  144. #define CFG_NUM_IRQS (128)
  145. #endif /* CONFIG_M5329 */
  146. #ifdef CONFIG_M54455
  147. #include <asm/immap_5445x.h>
  148. #include <asm/m5445x.h>
  149. #define CFG_FEC0_IOBASE (MMAP_FEC0)
  150. #define CFG_FEC1_IOBASE (MMAP_FEC1)
  151. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
  152. #define CFG_MCFRTC_BASE (MMAP_RTC)
  153. /* Timer */
  154. #ifdef CONFIG_MCFTMR
  155. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  156. #define CFG_TMR_BASE (MMAP_DTMR1)
  157. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  158. #define CFG_TMRINTR_NO (INT0_HI_DTMR1)
  159. #define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
  160. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  161. #define CFG_TMRINTR_PRI (6)
  162. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  163. #endif
  164. #ifdef CONFIG_MCFPIT
  165. #define CFG_UDELAY_BASE (MMAP_PIT0)
  166. #define CFG_PIT_BASE (MMAP_PIT1)
  167. #define CFG_PIT_PRESCALE (6)
  168. #endif
  169. #define CFG_INTR_BASE (MMAP_INTC0)
  170. #define CFG_NUM_IRQS (128)
  171. #ifdef CONFIG_PCI
  172. #define CFG_PCI_BAR0 CFG_SDRAM_BASE
  173. #define CFG_PCI_BAR4 CFG_SDRAM_BASE
  174. #define CFG_PCI_TBATR0 (CFG_SDRAM_BASE)
  175. #define CFG_PCI_TBATR4 (CFG_SDRAM_BASE)
  176. #endif
  177. #endif /* CONFIG_M54455 */
  178. #endif /* __IMMAP_H */