1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef m5307sim_h
15 #define m5307sim_h
16
17
18 #define CPU_NAME "COLDFIRE(m5307)"
19 #define CPU_INSTR_PER_JIFFY 3
20 #define MCF_BUSCLK (MCF_CLK / 2)
21
22 #include <asm/m53xxacr.h>
23
24
25
26
27 #define MCFSIM_RSR (MCF_MBAR + 0x00)
28 #define MCFSIM_SYPCR (MCF_MBAR + 0x01)
29 #define MCFSIM_SWIVR (MCF_MBAR + 0x02)
30 #define MCFSIM_SWSR (MCF_MBAR + 0x03)
31 #define MCFSIM_PAR (MCF_MBAR + 0x04)
32 #define MCFSIM_IRQPAR (MCF_MBAR + 0x06)
33 #define MCFSIM_PLLCR (MCF_MBAR + 0x08)
34 #define MCFSIM_MPARK (MCF_MBAR + 0x0C)
35 #define MCFSIM_IPR (MCF_MBAR + 0x40)
36 #define MCFSIM_IMR (MCF_MBAR + 0x44)
37 #define MCFSIM_AVR (MCF_MBAR + 0x4b)
38 #define MCFSIM_ICR0 (MCF_MBAR + 0x4c)
39 #define MCFSIM_ICR1 (MCF_MBAR + 0x4d)
40 #define MCFSIM_ICR2 (MCF_MBAR + 0x4e)
41 #define MCFSIM_ICR3 (MCF_MBAR + 0x4f)
42 #define MCFSIM_ICR4 (MCF_MBAR + 0x50)
43 #define MCFSIM_ICR5 (MCF_MBAR + 0x51)
44 #define MCFSIM_ICR6 (MCF_MBAR + 0x52)
45 #define MCFSIM_ICR7 (MCF_MBAR + 0x53)
46 #define MCFSIM_ICR8 (MCF_MBAR + 0x54)
47 #define MCFSIM_ICR9 (MCF_MBAR + 0x55)
48 #define MCFSIM_ICR10 (MCF_MBAR + 0x56)
49 #define MCFSIM_ICR11 (MCF_MBAR + 0x57)
50
51 #define MCFSIM_CSAR0 (MCF_MBAR + 0x80)
52 #define MCFSIM_CSMR0 (MCF_MBAR + 0x84)
53 #define MCFSIM_CSCR0 (MCF_MBAR + 0x8a)
54 #define MCFSIM_CSAR1 (MCF_MBAR + 0x8c)
55 #define MCFSIM_CSMR1 (MCF_MBAR + 0x90)
56 #define MCFSIM_CSCR1 (MCF_MBAR + 0x96)
57
58 #ifdef CONFIG_OLDMASK
59 #define MCFSIM_CSBAR (MCF_MBAR + 0x98)
60 #define MCFSIM_CSBAMR (MCF_MBAR + 0x9c)
61 #define MCFSIM_CSMR2 (MCF_MBAR + 0x9e)
62 #define MCFSIM_CSCR2 (MCF_MBAR + 0xa2)
63 #define MCFSIM_CSMR3 (MCF_MBAR + 0xaa)
64 #define MCFSIM_CSCR3 (MCF_MBAR + 0xae)
65 #define MCFSIM_CSMR4 (MCF_MBAR + 0xb6)
66 #define MCFSIM_CSCR4 (MCF_MBAR + 0xba)
67 #define MCFSIM_CSMR5 (MCF_MBAR + 0xc2)
68 #define MCFSIM_CSCR5 (MCF_MBAR + 0xc6)
69 #define MCFSIM_CSMR6 (MCF_MBAR + 0xce)
70 #define MCFSIM_CSCR6 (MCF_MBAR + 0xd2)
71 #define MCFSIM_CSMR7 (MCF_MBAR + 0xda)
72 #define MCFSIM_CSCR7 (MCF_MBAR + 0xde)
73 #else
74 #define MCFSIM_CSAR2 (MCF_MBAR + 0x98)
75 #define MCFSIM_CSMR2 (MCF_MBAR + 0x9c)
76 #define MCFSIM_CSCR2 (MCF_MBAR + 0xa2)
77 #define MCFSIM_CSAR3 (MCF_MBAR + 0xa4)
78 #define MCFSIM_CSMR3 (MCF_MBAR + 0xa8)
79 #define MCFSIM_CSCR3 (MCF_MBAR + 0xae)
80 #define MCFSIM_CSAR4 (MCF_MBAR + 0xb0)
81 #define MCFSIM_CSMR4 (MCF_MBAR + 0xb4)
82 #define MCFSIM_CSCR4 (MCF_MBAR + 0xba)
83 #define MCFSIM_CSAR5 (MCF_MBAR + 0xbc)
84 #define MCFSIM_CSMR5 (MCF_MBAR + 0xc0)
85 #define MCFSIM_CSCR5 (MCF_MBAR + 0xc6)
86 #define MCFSIM_CSAR6 (MCF_MBAR + 0xc8)
87 #define MCFSIM_CSMR6 (MCF_MBAR + 0xcc)
88 #define MCFSIM_CSCR6 (MCF_MBAR + 0xd2)
89 #define MCFSIM_CSAR7 (MCF_MBAR + 0xd4)
90 #define MCFSIM_CSMR7 (MCF_MBAR + 0xd8)
91 #define MCFSIM_CSCR7 (MCF_MBAR + 0xde)
92 #endif
93
94 #define MCFSIM_DCR (MCF_MBAR + 0x100)
95 #define MCFSIM_DACR0 (MCF_MBAR + 0x108)
96 #define MCFSIM_DMR0 (MCF_MBAR + 0x10c)
97 #define MCFSIM_DACR1 (MCF_MBAR + 0x110)
98 #define MCFSIM_DMR1 (MCF_MBAR + 0x114)
99
100
101
102
103 #define MCFTIMER_BASE1 (MCF_MBAR + 0x140)
104 #define MCFTIMER_BASE2 (MCF_MBAR + 0x180)
105
106 #define MCFSIM_PADDR (MCF_MBAR + 0x244)
107 #define MCFSIM_PADAT (MCF_MBAR + 0x248)
108
109
110
111
112 #define MCFDMA_BASE0 (MCF_MBAR + 0x300)
113 #define MCFDMA_BASE1 (MCF_MBAR + 0x340)
114 #define MCFDMA_BASE2 (MCF_MBAR + 0x380)
115 #define MCFDMA_BASE3 (MCF_MBAR + 0x3C0)
116
117
118
119
120 #if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3)
121 #define MCFUART_BASE0 (MCF_MBAR + 0x200)
122 #define MCFUART_BASE1 (MCF_MBAR + 0x1c0)
123 #else
124 #define MCFUART_BASE0 (MCF_MBAR + 0x1c0)
125 #define MCFUART_BASE1 (MCF_MBAR + 0x200)
126 #endif
127
128
129
130
131 #define MCFGPIO_PIN_MAX 16
132 #define MCFGPIO_IRQ_MAX -1
133 #define MCFGPIO_IRQ_VECBASE -1
134
135
136
137
138 #define MCF5307_CS2 (0x400000)
139 #define MCF5307_CS3 (0x600000)
140 #define MCF5307_CS4 (0x800000)
141 #define MCF5307_CS5 (0xA00000)
142 #define MCF5307_CS6 (0xC00000)
143 #define MCF5307_CS7 (0xE00000)
144
145
146
147
148
149 #define MCFSIM_SWDICR MCFSIM_ICR0
150 #define MCFSIM_TIMER1ICR MCFSIM_ICR1
151 #define MCFSIM_TIMER2ICR MCFSIM_ICR2
152 #define MCFSIM_I2CICR MCFSIM_ICR3
153 #define MCFSIM_UART1ICR MCFSIM_ICR4
154 #define MCFSIM_UART2ICR MCFSIM_ICR5
155 #define MCFSIM_DMA0ICR MCFSIM_ICR6
156 #define MCFSIM_DMA1ICR MCFSIM_ICR7
157 #define MCFSIM_DMA2ICR MCFSIM_ICR8
158 #define MCFSIM_DMA3ICR MCFSIM_ICR9
159
160
161
162
163 #define MCFSIM_PAR_DREQ0 0x40
164
165 #define MCFSIM_PAR_DREQ1 0x20
166
167
168
169
170
171 #define IRQ5_LEVEL4 0x80
172 #define IRQ3_LEVEL6 0x40
173 #define IRQ1_LEVEL2 0x20
174
175
176
177
178 #define MCF_IRQ_I2C0 29
179 #define MCF_IRQ_TIMER 30
180 #define MCF_IRQ_PROFILER 31
181 #define MCF_IRQ_UART0 73
182 #define MCF_IRQ_UART1 74
183
184
185
186
187 #define MCFI2C_BASE0 (MCF_MBAR + 0x280)
188 #define MCFI2C_SIZE0 0x40
189
190
191 #endif