blob: b0814f1601b24e7d050723cf1271bb61dee4a93b [file] [log] [blame]
TsiChungLiew2e0aeef2007-07-05 22:39:07 -05001/*
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
26#ifndef __IMMAP_H
27#define __IMMAP_H
Stefan Roesef1110122007-07-16 13:11:12 +020028
TsiChungLiew99b037a2008-01-14 17:43:33 -060029#ifdef CONFIG_M52277
30#include <asm/immap_5227x.h>
31#include <asm/m5227x.h>
32
33#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
34
35#define CFG_MCFRTC_BASE (MMAP_RTC)
36
37#ifdef CONFIG_LCD
38#define CFG_LCD_BASE (MMAP_LCD)
39#endif
40
41/* Timer */
42#ifdef CONFIG_MCFTMR
43#define CFG_UDELAY_BASE (MMAP_DTMR0)
44#define CFG_TMR_BASE (MMAP_DTMR1)
45#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
46#define CFG_TMRINTR_NO (INT0_HI_DTMR1)
47#define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
48#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
49#define CFG_TMRINTR_PRI (6)
50#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
51#endif
52
53#ifdef CONFIG_MCFPIT
54#define CFG_UDELAY_BASE (MMAP_PIT0)
55#define CFG_PIT_BASE (MMAP_PIT1)
56#define CFG_PIT_PRESCALE (6)
57#endif
58
59#define CFG_INTR_BASE (MMAP_INTC0)
60#define CFG_NUM_IRQS (128)
61#endif /* CONFIG_M52277 */
62
TsiChungLiewb859ef12007-08-16 19:23:50 -050063#ifdef CONFIG_M5235
64#include <asm/immap_5235.h>
65#include <asm/m5235.h>
66
67#define CFG_FEC0_IOBASE (MMAP_FEC)
68#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
69
70/* Timer */
71#ifdef CONFIG_MCFTMR
72#define CFG_UDELAY_BASE (MMAP_DTMR0)
73#define CFG_TMR_BASE (MMAP_DTMR3)
74#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
75#define CFG_TMRINTR_NO (INT0_LO_DTMR3)
76#define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
77#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
78#define CFG_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
79#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
80#endif
81
82#ifdef CONFIG_MCFPIT
83#define CFG_UDELAY_BASE (MMAP_PIT0)
84#define CFG_PIT_BASE (MMAP_PIT1)
85#define CFG_PIT_PRESCALE (6)
86#endif
87
88#define CFG_INTR_BASE (MMAP_INTC0)
89#define CFG_NUM_IRQS (128)
90#endif /* CONFIG_M5235 */
91
TsiChungLiew0e81abc2007-08-15 19:38:15 -050092#ifdef CONFIG_M5249
93#include <asm/immap_5249.h>
94#include <asm/m5249.h>
95
96#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
97
98#define CFG_INTR_BASE (MMAP_INTC)
99#define CFG_NUM_IRQS (64)
100
101/* Timer */
102#ifdef CONFIG_MCFTMR
103#define CFG_UDELAY_BASE (MMAP_DTMR0)
104#define CFG_TMR_BASE (MMAP_DTMR1)
105#define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
106#define CFG_TMRINTR_NO (31)
107#define CFG_TMRINTR_MASK (0x00000400)
108#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
TsiChungLiew34674692007-08-16 13:20:50 -0500109#define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3)
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500110#define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
111#endif
112#endif /* CONFIG_M5249 */
113
TsiChungLiew34674692007-08-16 13:20:50 -0500114#ifdef CONFIG_M5253
115#include <asm/immap_5253.h>
116#include <asm/m5249.h>
117#include <asm/m5253.h>
118
119#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
120
121#define CFG_INTR_BASE (MMAP_INTC)
122#define CFG_NUM_IRQS (64)
123
124/* Timer */
125#ifdef CONFIG_MCFTMR
126#define CFG_UDELAY_BASE (MMAP_DTMR0)
127#define CFG_TMR_BASE (MMAP_DTMR1)
128#define CFG_TMRPND_REG (mbar_readLong(MCFSIM_IPR))
129#define CFG_TMRINTR_NO (27)
130#define CFG_TMRINTR_MASK (0x00000400)
131#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
132#define CFG_TMRINTR_PRI (MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL3 | MCFSIM_ICR_PRI3)
133#define CFG_TIMER_PRESCALER (((gd->bus_clk / 2000000) - 1) << 8)
134#endif
135#endif /* CONFIG_M5253 */
136
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500137#ifdef CONFIG_M5271
138#include <asm/immap_5271.h>
139#include <asm/m5271.h>
140
141#define CFG_FEC0_IOBASE (MMAP_FEC)
142#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
143
144/* Timer */
145#ifdef CONFIG_MCFTMR
146#define CFG_UDELAY_BASE (MMAP_DTMR0)
147#define CFG_TMR_BASE (MMAP_DTMR3)
148#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
149#define CFG_TMRINTR_NO (INT0_LO_DTMR3)
150#define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
151#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
152#define CFG_TMRINTR_PRI (0) /* Level must include inorder to work */
153#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
154#endif
155
156#define CFG_INTR_BASE (MMAP_INTC0)
157#define CFG_NUM_IRQS (128)
158#endif /* CONFIG_M5271 */
159
160#ifdef CONFIG_M5272
161#include <asm/immap_5272.h>
162#include <asm/m5272.h>
163
164#define CFG_FEC0_IOBASE (MMAP_FEC)
165#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
166
167#define CFG_INTR_BASE (MMAP_INTC)
168#define CFG_NUM_IRQS (64)
169
170/* Timer */
171#ifdef CONFIG_MCFTMR
172#define CFG_UDELAY_BASE (MMAP_TMR0)
173#define CFG_TMR_BASE (MMAP_TMR3)
174#define CFG_TMRPND_REG (((volatile intctrl_t *)(CFG_INTR_BASE))->int_isr)
175#define CFG_TMRINTR_NO (INT_TMR3)
176#define CFG_TMRINTR_MASK (INT_ISR_INT24)
177#define CFG_TMRINTR_PEND (0)
178#define CFG_TMRINTR_PRI (INT_ICR1_TMR3PI | INT_ICR1_TMR3IPL(5))
179#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
180#endif
181#endif /* CONFIG_M5272 */
182
Matthew Fettke761e2e92008-02-04 15:38:20 -0600183#ifdef CONFIG_M5275
184#include <asm/immap_5275.h>
185#include <asm/m5275.h>
186
187#define CFG_FEC0_IOBASE (MMAP_FEC0)
188#define CFG_FEC1_IOBASE (MMAP_FEC1)
189#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
190
191#define CFG_INTR_BASE (MMAP_INTC0)
192#define CFG_NUM_IRQS (192)
193
194/* Timer */
195#ifdef CONFIG_MCFTMR
196#define CFG_UDELAY_BASE (MMAP_DTMR0)
197#define CFG_TMR_BASE (MMAP_DTMR3)
198#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
199#define CFG_TMRINTR_NO (INT0_LO_DTMR3)
200#define CFG_TMRINTR_MASK (INTC_IPRL_INT22)
201#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
202#define CFG_TMRINTR_PRI (0x1E)
203#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
204#endif
205#endif /* CONFIG_M5275 */
206
TsiChungLiew0e81abc2007-08-15 19:38:15 -0500207#ifdef CONFIG_M5282
208#include <asm/immap_5282.h>
209#include <asm/m5282.h>
210
211#define CFG_FEC0_IOBASE (MMAP_FEC)
212#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x40))
213
214#define CFG_INTR_BASE (MMAP_INTC0)
215#define CFG_NUM_IRQS (128)
216
217/* Timer */
218#ifdef CONFIG_MCFTMR
219#define CFG_UDELAY_BASE (MMAP_DTMR0)
220#define CFG_TMR_BASE (MMAP_DTMR3)
221#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
222#define CFG_TMRINTR_NO (INT0_LO_DTMR3)
223#define CFG_TMRINTR_MASK (1 << INT0_LO_DTMR3)
224#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
225#define CFG_TMRINTR_PRI (0x1E) /* Level must include inorder to work */
226#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
227#endif
228#endif /* CONFIG_M5282 */
229
TsiChungLiew6f8a0a32008-01-14 17:23:08 -0600230#if defined(CONFIG_M5329) || defined(CONFIG_M5373)
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500231#include <asm/immap_5329.h>
232#include <asm/m5329.h>
233
234#define CFG_FEC0_IOBASE (MMAP_FEC)
235#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
236#define CFG_MCFRTC_BASE (MMAP_RTC)
237
238/* Timer */
239#ifdef CONFIG_MCFTMR
240#define CFG_UDELAY_BASE (MMAP_DTMR0)
241#define CFG_TMR_BASE (MMAP_DTMR1)
TsiChungLiewaedd3d72007-08-15 15:39:17 -0500242#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500243#define CFG_TMRINTR_NO (INT0_HI_DTMR1)
244#define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
TsiChungLiewaedd3d72007-08-15 15:39:17 -0500245#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500246#define CFG_TMRINTR_PRI (6)
TsiChungLiew699f2282007-08-05 03:58:52 -0500247#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500248#endif
249
250#ifdef CONFIG_MCFPIT
251#define CFG_UDELAY_BASE (MMAP_PIT0)
252#define CFG_PIT_BASE (MMAP_PIT1)
253#define CFG_PIT_PRESCALE (6)
254#endif
255
256#define CFG_INTR_BASE (MMAP_INTC0)
257#define CFG_NUM_IRQS (128)
TsiChungLiew6f8a0a32008-01-14 17:23:08 -0600258#endif /* CONFIG_M5329 && CONFIG_M5373 */
Stefan Roesef1110122007-07-16 13:11:12 +0200259
TsiChung Liew3cdc00a2008-08-11 13:41:49 +0000260#if defined(CONFIG_M54451) || defined(CONFIG_M54455)
TsiChungLiewfc3ca3b2007-08-16 15:05:11 -0500261#include <asm/immap_5445x.h>
262#include <asm/m5445x.h>
263
264#define CFG_FEC0_IOBASE (MMAP_FEC0)
TsiChung Liew3cdc00a2008-08-11 13:41:49 +0000265#if defined(CONFIG_M54455EVB)
TsiChungLiewfc3ca3b2007-08-16 15:05:11 -0500266#define CFG_FEC1_IOBASE (MMAP_FEC1)
TsiChung Liew3cdc00a2008-08-11 13:41:49 +0000267#endif
TsiChungLiewfc3ca3b2007-08-16 15:05:11 -0500268
269#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x4000))
270
271#define CFG_MCFRTC_BASE (MMAP_RTC)
272
273/* Timer */
274#ifdef CONFIG_MCFTMR
275#define CFG_UDELAY_BASE (MMAP_DTMR0)
276#define CFG_TMR_BASE (MMAP_DTMR1)
277#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
278#define CFG_TMRINTR_NO (INT0_HI_DTMR1)
279#define CFG_TMRINTR_MASK (INTC_IPRH_INT33)
280#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
281#define CFG_TMRINTR_PRI (6)
282#define CFG_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8)
283#endif
284
285#ifdef CONFIG_MCFPIT
286#define CFG_UDELAY_BASE (MMAP_PIT0)
287#define CFG_PIT_BASE (MMAP_PIT1)
288#define CFG_PIT_PRESCALE (6)
289#endif
290
291#define CFG_INTR_BASE (MMAP_INTC0)
292#define CFG_NUM_IRQS (128)
293
294#ifdef CONFIG_PCI
TsiChungLiew3b790502008-01-14 17:11:47 -0600295#define CFG_PCI_BAR0 (CFG_MBAR)
296#define CFG_PCI_BAR5 (CFG_SDRAM_BASE)
297#define CFG_PCI_TBATR0 (CFG_MBAR)
298#define CFG_PCI_TBATR5 (CFG_SDRAM_BASE)
TsiChungLiewfc3ca3b2007-08-16 15:05:11 -0500299#endif
TsiChung Liew3cdc00a2008-08-11 13:41:49 +0000300#endif /* CONFIG_M54451 || CONFIG_M54455 */
TsiChungLiewfc3ca3b2007-08-16 15:05:11 -0500301
TsiChungLiew471b2c62008-01-15 13:39:44 -0600302#ifdef CONFIG_M547x
303#include <asm/immap_547x_8x.h>
304#include <asm/m547x_8x.h>
305
306#ifdef CONFIG_FSLDMAFEC
307#define CFG_FEC0_IOBASE (MMAP_FEC0)
308#define CFG_FEC1_IOBASE (MMAP_FEC1)
309
310#define FEC0_RX_TASK 0
311#define FEC0_TX_TASK 1
312#define FEC0_RX_PRIORITY 6
313#define FEC0_TX_PRIORITY 7
314#define FEC0_RX_INIT 16
315#define FEC0_TX_INIT 17
316#define FEC1_RX_TASK 2
317#define FEC1_TX_TASK 3
318#define FEC1_RX_PRIORITY 6
319#define FEC1_TX_PRIORITY 7
320#define FEC1_RX_INIT 30
321#define FEC1_TX_INIT 31
322#endif
323
324#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x100))
325
326#ifdef CONFIG_SLTTMR
327#define CFG_UDELAY_BASE (MMAP_SLT1)
328#define CFG_TMR_BASE (MMAP_SLT0)
329#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
330#define CFG_TMRINTR_NO (INT0_HI_SLT0)
331#define CFG_TMRINTR_MASK (INTC_IPRH_INT54)
332#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
333#define CFG_TMRINTR_PRI (0x1E)
334#define CFG_TIMER_PRESCALER (gd->bus_clk / 1000000)
335#endif
336
337#define CFG_INTR_BASE (MMAP_INTC0)
338#define CFG_NUM_IRQS (128)
339
340#ifdef CONFIG_PCI
341#define CFG_PCI_BAR0 (0x40000000)
342#define CFG_PCI_BAR1 (CFG_SDRAM_BASE)
343#define CFG_PCI_TBATR0 (CFG_MBAR)
344#define CFG_PCI_TBATR1 (CFG_SDRAM_BASE)
345#endif
346#endif /* CONFIG_M547x */
347
348#ifdef CONFIG_M548x
349#include <asm/immap_547x_8x.h>
350#include <asm/m547x_8x.h>
351
352#ifdef CONFIG_FSLDMAFEC
353#define CFG_FEC0_IOBASE (MMAP_FEC0)
354#define CFG_FEC1_IOBASE (MMAP_FEC1)
355
356#define FEC0_RX_TASK 0
357#define FEC0_TX_TASK 1
358#define FEC0_RX_PRIORITY 6
359#define FEC0_TX_PRIORITY 7
360#define FEC0_RX_INIT 16
361#define FEC0_TX_INIT 17
362#define FEC1_RX_TASK 2
363#define FEC1_TX_TASK 3
364#define FEC1_RX_PRIORITY 6
365#define FEC1_TX_PRIORITY 7
366#define FEC1_RX_INIT 30
367#define FEC1_TX_INIT 31
368#endif
369
370#define CFG_UART_BASE (MMAP_UART0 + (CFG_UART_PORT * 0x100))
371
372/* Timer */
373#ifdef CONFIG_SLTTMR
374#define CFG_UDELAY_BASE (MMAP_SLT1)
375#define CFG_TMR_BASE (MMAP_SLT0)
376#define CFG_TMRPND_REG (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
377#define CFG_TMRINTR_NO (INT0_HI_SLT0)
378#define CFG_TMRINTR_MASK (INTC_IPRH_INT54)
379#define CFG_TMRINTR_PEND (CFG_TMRINTR_MASK)
380#define CFG_TMRINTR_PRI (0x1E)
381#define CFG_TIMER_PRESCALER (gd->bus_clk / 1000000)
382#endif
383
384#define CFG_INTR_BASE (MMAP_INTC0)
385#define CFG_NUM_IRQS (128)
386
387#ifdef CONFIG_PCI
388#define CFG_PCI_BAR0 (CFG_MBAR)
389#define CFG_PCI_BAR1 (CFG_SDRAM_BASE)
390#define CFG_PCI_TBATR0 (CFG_MBAR)
391#define CFG_PCI_TBATR1 (CFG_SDRAM_BASE)
392#endif
393#endif /* CONFIG_M548x */
394
TsiChungLiew2e0aeef2007-07-05 22:39:07 -0500395#endif /* __IMMAP_H */