immap.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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_M52277
  28. #include <asm/immap_5227x.h>
  29. #include <asm/m5227x.h>
  30. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
  31. #define CFG_MCFRTC_BASE (MMAP_RTC)
  32. #ifdef CONFIG_LCD
  33. #define CFG_LCD_BASE (MMAP_LCD)
  34. #endif
  35. /* Timer */
  36. #ifdef CONFIG_MCFTMR
  37. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  38. #define CFG_TMR_BASE (MMAP_DTMR1)
  39. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  40. #define CFG_TMRINTR_NO (INT0_HI_DTMR1)
  41. #define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
  42. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  43. #define CFG_TMRINTR_PRI (6)
  44. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  45. #endif
  46. #ifdef CONFIG_MCFPIT
  47. #define CFG_UDELAY_BASE (MMAP_PIT0)
  48. #define CFG_PIT_BASE (MMAP_PIT1)
  49. #define CFG_PIT_PRESCALE (6)
  50. #endif
  51. #define CFG_INTR_BASE (MMAP_INTC0)
  52. #define CFG_NUM_IRQS (128)
  53. #endif /* CONFIG_M52277 */
  54. #ifdef CONFIG_M5235
  55. #include <asm/immap_5235.h>
  56. #include <asm/m5235.h>
  57. #define CFG_FEC0_IOBASE (MMAP_FEC)
  58. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  59. /* Timer */
  60. #ifdef CONFIG_MCFTMR
  61. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  62. #define CFG_TMR_BASE (MMAP_DTMR3)
  63. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  64. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  65. #define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
  66. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  67. #define CFG_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
  68. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  69. #endif
  70. #ifdef CONFIG_MCFPIT
  71. #define CFG_UDELAY_BASE (MMAP_PIT0)
  72. #define CFG_PIT_BASE (MMAP_PIT1)
  73. #define CFG_PIT_PRESCALE (6)
  74. #endif
  75. #define CFG_INTR_BASE (MMAP_INTC0)
  76. #define CFG_NUM_IRQS (128)
  77. #endif /* CONFIG_M5235 */
  78. #ifdef CONFIG_M5249
  79. #include <asm/immap_5249.h>
  80. #include <asm/m5249.h>
  81. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  82. #define CFG_INTR_BASE (MMAP_INTC)
  83. #define CFG_NUM_IRQS (64)
  84. /* Timer */
  85. #ifdef CONFIG_MCFTMR
  86. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  87. #define CFG_TMR_BASE (MMAP_DTMR1)
  88. #define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
  89. #define CFG_TMRINTR_NO (31)
  90. #define CFG_TMRINTR_MASK (0x00000400)
  91. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  92. #define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3)
  93. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
  94. #endif
  95. #endif /* CONFIG_M5249 */
  96. #ifdef CONFIG_M5253
  97. #include <asm/immap_5253.h>
  98. #include <asm/m5249.h>
  99. #include <asm/m5253.h>
  100. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  101. #define CFG_INTR_BASE (MMAP_INTC)
  102. #define CFG_NUM_IRQS (64)
  103. /* Timer */
  104. #ifdef CONFIG_MCFTMR
  105. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  106. #define CFG_TMR_BASE (MMAP_DTMR1)
  107. #define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
  108. #define CFG_TMRINTR_NO (27)
  109. #define CFG_TMRINTR_MASK (0x00000400)
  110. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  111. #define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL3 | MCFSIM_ICR_PRI3)
  112. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
  113. #endif
  114. #endif /* CONFIG_M5253 */
  115. #ifdef CONFIG_M5271
  116. #include <asm/immap_5271.h>
  117. #include <asm/m5271.h>
  118. #define CFG_FEC0_IOBASE (MMAP_FEC)
  119. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  120. /* Timer */
  121. #ifdef CONFIG_MCFTMR
  122. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  123. #define CFG_TMR_BASE (MMAP_DTMR3)
  124. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  125. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  126. #define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
  127. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  128. #define CFG_TMRINTR_PRI (0) /* Level must include inorder to work */
  129. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  130. #endif
  131. #define CFG_INTR_BASE (MMAP_INTC0)
  132. #define CFG_NUM_IRQS (128)
  133. #endif /* CONFIG_M5271 */
  134. #ifdef CONFIG_M5272
  135. #include <asm/immap_5272.h>
  136. #include <asm/m5272.h>
  137. #define CFG_FEC0_IOBASE (MMAP_FEC)
  138. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  139. #define CFG_INTR_BASE (MMAP_INTC)
  140. #define CFG_NUM_IRQS (64)
  141. /* Timer */
  142. #ifdef CONFIG_MCFTMR
  143. #define CFG_UDELAY_BASE (MMAP_TMR0)
  144. #define CFG_TMR_BASE (MMAP_TMR3)
  145. #define CFG_TMRPND_REG (((volatile intctrl_t *)(CFG_INTR_BASE))->int_isr)
  146. #define CFG_TMRINTR_NO (INT_TMR3)
  147. #define CFG_TMRINTR_MASK (INT_ISR_INT24)
  148. #define CFG_TMRINTR_PEND (0)
  149. #define CFG_TMRINTR_PRI (INT_ICR1_TMR3PI | INT_ICR1_TMR3IPL(5))
  150. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  151. #endif
  152. #endif /* CONFIG_M5272 */
  153. #ifdef CONFIG_M5282
  154. #include <asm/immap_5282.h>
  155. #include <asm/m5282.h>
  156. #define CFG_FEC0_IOBASE (MMAP_FEC)
  157. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
  158. #define CFG_INTR_BASE (MMAP_INTC0)
  159. #define CFG_NUM_IRQS (128)
  160. /* Timer */
  161. #ifdef CONFIG_MCFTMR
  162. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  163. #define CFG_TMR_BASE (MMAP_DTMR3)
  164. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
  165. #define CFG_TMRINTR_NO (INT0_LO_DTMR3)
  166. #define CFG_TMRINTR_MASK (1 << INT0_LO_DTMR3)
  167. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  168. #define CFG_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
  169. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  170. #endif
  171. #endif /* CONFIG_M5282 */
  172. #if defined(CONFIG_M5329) || defined(CONFIG_M5373)
  173. #include <asm/immap_5329.h>
  174. #include <asm/m5329.h>
  175. #define CFG_FEC0_IOBASE (MMAP_FEC)
  176. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
  177. #define CFG_MCFRTC_BASE (MMAP_RTC)
  178. /* Timer */
  179. #ifdef CONFIG_MCFTMR
  180. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  181. #define CFG_TMR_BASE (MMAP_DTMR1)
  182. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  183. #define CFG_TMRINTR_NO (INT0_HI_DTMR1)
  184. #define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
  185. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  186. #define CFG_TMRINTR_PRI (6)
  187. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  188. #endif
  189. #ifdef CONFIG_MCFPIT
  190. #define CFG_UDELAY_BASE (MMAP_PIT0)
  191. #define CFG_PIT_BASE (MMAP_PIT1)
  192. #define CFG_PIT_PRESCALE (6)
  193. #endif
  194. #define CFG_INTR_BASE (MMAP_INTC0)
  195. #define CFG_NUM_IRQS (128)
  196. #endif /* CONFIG_M5329 && CONFIG_M5373 */
  197. #ifdef CONFIG_M54455
  198. #include <asm/immap_5445x.h>
  199. #include <asm/m5445x.h>
  200. #define CFG_FEC0_IOBASE (MMAP_FEC0)
  201. #define CFG_FEC1_IOBASE (MMAP_FEC1)
  202. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
  203. #define CFG_MCFRTC_BASE (MMAP_RTC)
  204. /* Timer */
  205. #ifdef CONFIG_MCFTMR
  206. #define CFG_UDELAY_BASE (MMAP_DTMR0)
  207. #define CFG_TMR_BASE (MMAP_DTMR1)
  208. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  209. #define CFG_TMRINTR_NO (INT0_HI_DTMR1)
  210. #define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
  211. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  212. #define CFG_TMRINTR_PRI (6)
  213. #define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
  214. #endif
  215. #ifdef CONFIG_MCFPIT
  216. #define CFG_UDELAY_BASE (MMAP_PIT0)
  217. #define CFG_PIT_BASE (MMAP_PIT1)
  218. #define CFG_PIT_PRESCALE (6)
  219. #endif
  220. #define CFG_INTR_BASE (MMAP_INTC0)
  221. #define CFG_NUM_IRQS (128)
  222. #ifdef CONFIG_PCI
  223. #define CFG_PCI_BAR0 (CFG_MBAR)
  224. #define CFG_PCI_BAR5 (CFG_SDRAM_BASE)
  225. #define CFG_PCI_TBATR0 (CFG_MBAR)
  226. #define CFG_PCI_TBATR5 (CFG_SDRAM_BASE)
  227. #endif
  228. #endif /* CONFIG_M54455 */
  229. #ifdef CONFIG_M547x
  230. #include <asm/immap_547x_8x.h>
  231. #include <asm/m547x_8x.h>
  232. #ifdef CONFIG_FSLDMAFEC
  233. #define CFG_FEC0_IOBASE (MMAP_FEC0)
  234. #define CFG_FEC1_IOBASE (MMAP_FEC1)
  235. #define FEC0_RX_TASK 0
  236. #define FEC0_TX_TASK 1
  237. #define FEC0_RX_PRIORITY 6
  238. #define FEC0_TX_PRIORITY 7
  239. #define FEC0_RX_INIT 16
  240. #define FEC0_TX_INIT 17
  241. #define FEC1_RX_TASK 2
  242. #define FEC1_TX_TASK 3
  243. #define FEC1_RX_PRIORITY 6
  244. #define FEC1_TX_PRIORITY 7
  245. #define FEC1_RX_INIT 30
  246. #define FEC1_TX_INIT 31
  247. #endif
  248. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x100))
  249. #ifdef CONFIG_SLTTMR
  250. #define CFG_UDELAY_BASE (MMAP_SLT1)
  251. #define CFG_TMR_BASE (MMAP_SLT0)
  252. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  253. #define CFG_TMRINTR_NO (INT0_HI_SLT0)
  254. #define CFG_TMRINTR_MASK (INTC_IPRH_INT54)
  255. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  256. #define CFG_TMRINTR_PRI (0x1E)
  257. #define CFG_TIMER_PRESCALER (gd->bus_clk / 1000000)
  258. #endif
  259. #define CFG_INTR_BASE (MMAP_INTC0)
  260. #define CFG_NUM_IRQS (128)
  261. #ifdef CONFIG_PCI
  262. #define CFG_PCI_BAR0 (0x40000000)
  263. #define CFG_PCI_BAR1 (CFG_SDRAM_BASE)
  264. #define CFG_PCI_TBATR0 (CFG_MBAR)
  265. #define CFG_PCI_TBATR1 (CFG_SDRAM_BASE)
  266. #endif
  267. #endif /* CONFIG_M547x */
  268. #ifdef CONFIG_M548x
  269. #include <asm/immap_547x_8x.h>
  270. #include <asm/m547x_8x.h>
  271. #ifdef CONFIG_FSLDMAFEC
  272. #define CFG_FEC0_IOBASE (MMAP_FEC0)
  273. #define CFG_FEC1_IOBASE (MMAP_FEC1)
  274. #define FEC0_RX_TASK 0
  275. #define FEC0_TX_TASK 1
  276. #define FEC0_RX_PRIORITY 6
  277. #define FEC0_TX_PRIORITY 7
  278. #define FEC0_RX_INIT 16
  279. #define FEC0_TX_INIT 17
  280. #define FEC1_RX_TASK 2
  281. #define FEC1_TX_TASK 3
  282. #define FEC1_RX_PRIORITY 6
  283. #define FEC1_TX_PRIORITY 7
  284. #define FEC1_RX_INIT 30
  285. #define FEC1_TX_INIT 31
  286. #endif
  287. #define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x100))
  288. /* Timer */
  289. #ifdef CONFIG_SLTTMR
  290. #define CFG_UDELAY_BASE (MMAP_SLT1)
  291. #define CFG_TMR_BASE (MMAP_SLT0)
  292. #define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
  293. #define CFG_TMRINTR_NO (INT0_HI_SLT0)
  294. #define CFG_TMRINTR_MASK (INTC_IPRH_INT54)
  295. #define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
  296. #define CFG_TMRINTR_PRI (0x1E)
  297. #define CFG_TIMER_PRESCALER (gd->bus_clk / 1000000)
  298. #endif
  299. #define CFG_INTR_BASE (MMAP_INTC0)
  300. #define CFG_NUM_IRQS (128)
  301. #ifdef CONFIG_PCI
  302. #define CFG_PCI_BAR0 (CFG_MBAR)
  303. #define CFG_PCI_BAR1 (CFG_SDRAM_BASE)
  304. #define CFG_PCI_TBATR0 (CFG_MBAR)
  305. #define CFG_PCI_TBATR1 (CFG_SDRAM_BASE)
  306. #endif
  307. #endif /* CONFIG_M548x */
  308. #endif /* __IMMAP_H */