]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - include/asm-m68k/immap.h
ColdFire: MCF52x2 Header files update
[karo-tx-uboot.git] / include / asm-m68k / immap.h
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
26 #ifndef __IMMAP_H
27 #define __IMMAP_H
28
29 #ifdef CONFIG_M5249
30 #include <asm/immap_5249.h>
31 #include <asm/m5249.h>
32
33 #define CFG_UART_BASE           (MMAP_UART0 + (CFG_UART_PORT * 0x40))
34
35 #define CFG_INTR_BASE           (MMAP_INTC)
36 #define CFG_NUM_IRQS            (64)
37
38 /* Timer */
39 #ifdef CONFIG_MCFTMR
40 #define CFG_UDELAY_BASE         (MMAP_DTMR0)
41 #define CFG_TMR_BASE            (MMAP_DTMR1)
42 #define CFG_TMRPND_REG          (mbar_readLong(MCFSIM_IPR))
43 #define CFG_TMRINTR_NO          (31)
44 #define CFG_TMRINTR_MASK        (0x00000400)
45 #define CFG_TMRINTR_PEND        (CFG_TMRINTR_MASK)
46 #define CFG_TMRINTR_PRI         (0)             /* Level must include inorder to work */
47 #define CFG_TIMER_PRESCALER     (((gd->bus_clk / 2000000) - 1) << 8)
48 #endif
49 #endif                          /* CONFIG_M5249 */
50
51 #ifdef CONFIG_M5271
52 #include <asm/immap_5271.h>
53 #include <asm/m5271.h>
54
55 #define CFG_FEC0_IOBASE         (MMAP_FEC)
56 #define CFG_UART_BASE           (MMAP_UART0 + (CFG_UART_PORT * 0x40))
57
58 /* Timer */
59 #ifdef CONFIG_MCFTMR
60 #define CFG_UDELAY_BASE         (MMAP_DTMR0)
61 #define CFG_TMR_BASE            (MMAP_DTMR3)
62 #define CFG_TMRPND_REG          (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
63 #define CFG_TMRINTR_NO          (INT0_LO_DTMR3)
64 #define CFG_TMRINTR_MASK        (INTC_IPRL_INT22)
65 #define CFG_TMRINTR_PEND        (CFG_TMRINTR_MASK)
66 #define CFG_TMRINTR_PRI         (0)             /* Level must include inorder to work */
67 #define CFG_TIMER_PRESCALER     (((gd->bus_clk / 1000000) - 1) << 8)
68 #endif
69
70 #define CFG_INTR_BASE           (MMAP_INTC0)
71 #define CFG_NUM_IRQS            (128)
72 #endif                          /* CONFIG_M5271 */
73
74 #ifdef CONFIG_M5272
75 #include <asm/immap_5272.h>
76 #include <asm/m5272.h>
77
78 #define CFG_FEC0_IOBASE         (MMAP_FEC)
79 #define CFG_UART_BASE           (MMAP_UART0 + (CFG_UART_PORT * 0x40))
80
81 #define CFG_INTR_BASE           (MMAP_INTC)
82 #define CFG_NUM_IRQS            (64)
83
84 /* Timer */
85 #ifdef CONFIG_MCFTMR
86 #define CFG_UDELAY_BASE         (MMAP_TMR0)
87 #define CFG_TMR_BASE            (MMAP_TMR3)
88 #define CFG_TMRPND_REG          (((volatile intctrl_t *)(CFG_INTR_BASE))->int_isr)
89 #define CFG_TMRINTR_NO          (INT_TMR3)
90 #define CFG_TMRINTR_MASK        (INT_ISR_INT24)
91 #define CFG_TMRINTR_PEND        (0)
92 #define CFG_TMRINTR_PRI         (INT_ICR1_TMR3PI | INT_ICR1_TMR3IPL(5))
93 #define CFG_TIMER_PRESCALER     (((gd->bus_clk / 1000000) - 1) << 8)
94 #endif
95 #endif                          /* CONFIG_M5272 */
96
97 #ifdef CONFIG_M5282
98 #include <asm/immap_5282.h>
99 #include <asm/m5282.h>
100
101 #define CFG_FEC0_IOBASE         (MMAP_FEC)
102 #define CFG_UART_BASE           (MMAP_UART0 + (CFG_UART_PORT * 0x40))
103
104 #define CFG_INTR_BASE           (MMAP_INTC0)
105 #define CFG_NUM_IRQS            (128)
106
107 /* Timer */
108 #ifdef CONFIG_MCFTMR
109 #define CFG_UDELAY_BASE         (MMAP_DTMR0)
110 #define CFG_TMR_BASE            (MMAP_DTMR3)
111 #define CFG_TMRPND_REG          (((volatile int0_t *)(CFG_INTR_BASE))->iprl0)
112 #define CFG_TMRINTR_NO          (INT0_LO_DTMR3)
113 #define CFG_TMRINTR_MASK        (1 << INT0_LO_DTMR3)
114 #define CFG_TMRINTR_PEND        (CFG_TMRINTR_MASK)
115 #define CFG_TMRINTR_PRI         (0x1E)          /* Level must include inorder to work */
116 #define CFG_TIMER_PRESCALER     (((gd->bus_clk / 1000000) - 1) << 8)
117 #endif
118 #endif                          /* CONFIG_M5282 */
119
120 #ifdef CONFIG_M5329
121 #include <asm/immap_5329.h>
122 #include <asm/m5329.h>
123
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
128 /* Timer */
129 #ifdef CONFIG_MCFTMR
130 #define CFG_UDELAY_BASE         (MMAP_DTMR0)
131 #define CFG_TMR_BASE            (MMAP_DTMR1)
132 #define CFG_TMRPND_REG          (((volatile int0_t *)(CFG_INTR_BASE))->iprh0)
133 #define CFG_TMRINTR_NO          (INT0_HI_DTMR1)
134 #define CFG_TMRINTR_MASK        (INTC_IPRH_INT33)
135 #define CFG_TMRINTR_PEND        (CFG_TMRINTR_MASK)
136 #define CFG_TMRINTR_PRI         (6)
137 #define CFG_TIMER_PRESCALER     (((gd->bus_clk / 1000000) - 1) << 8)
138 #endif
139
140 #ifdef CONFIG_MCFPIT
141 #define CFG_UDELAY_BASE         (MMAP_PIT0)
142 #define CFG_PIT_BASE            (MMAP_PIT1)
143 #define CFG_PIT_PRESCALE        (6)
144 #endif
145
146 #define CFG_INTR_BASE           (MMAP_INTC0)
147 #define CFG_NUM_IRQS            (128)
148 #endif                          /* CONFIG_M5329 */
149
150 #endif                          /* __IMMAP_H */