1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef m5407sim_h
15 #define m5407sim_h
16
17
18 #define CPU_NAME "COLDFIRE(m5407)"
19 #define CPU_INSTR_PER_JIFFY 3
20 #define MCF_BUSCLK (MCF_CLK / 2)
21
22 #include <asm/m54xxacr.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 #define MCFSIM_CSAR2 (MCF_MBAR + 0x98)
59 #define MCFSIM_CSMR2 (MCF_MBAR + 0x9c)
60 #define MCFSIM_CSCR2 (MCF_MBAR + 0xa2)
61 #define MCFSIM_CSAR3 (MCF_MBAR + 0xa4)
62 #define MCFSIM_CSMR3 (MCF_MBAR + 0xa8)
63 #define MCFSIM_CSCR3 (MCF_MBAR + 0xae)
64 #define MCFSIM_CSAR4 (MCF_MBAR + 0xb0)
65 #define MCFSIM_CSMR4 (MCF_MBAR + 0xb4)
66 #define MCFSIM_CSCR4 (MCF_MBAR + 0xba)
67 #define MCFSIM_CSAR5 (MCF_MBAR + 0xbc)
68 #define MCFSIM_CSMR5 (MCF_MBAR + 0xc0)
69 #define MCFSIM_CSCR5 (MCF_MBAR + 0xc6)
70 #define MCFSIM_CSAR6 (MCF_MBAR + 0xc8)
71 #define MCFSIM_CSMR6 (MCF_MBAR + 0xcc)
72 #define MCFSIM_CSCR6 (MCF_MBAR + 0xd2)
73 #define MCFSIM_CSAR7 (MCF_MBAR + 0xd4)
74 #define MCFSIM_CSMR7 (MCF_MBAR + 0xd8)
75 #define MCFSIM_CSCR7 (MCF_MBAR + 0xde)
76
77 #define MCFSIM_DCR (MCF_MBAR + 0x100)
78 #define MCFSIM_DACR0 (MCF_MBAR + 0x108)
79 #define MCFSIM_DMR0 (MCF_MBAR + 0x10c)
80 #define MCFSIM_DACR1 (MCF_MBAR + 0x110)
81 #define MCFSIM_DMR1 (MCF_MBAR + 0x114)
82
83
84
85
86 #define MCFTIMER_BASE1 (MCF_MBAR + 0x140)
87 #define MCFTIMER_BASE2 (MCF_MBAR + 0x180)
88
89 #define MCFUART_BASE0 (MCF_MBAR + 0x1c0)
90 #define MCFUART_BASE1 (MCF_MBAR + 0x200)
91
92 #define MCFSIM_PADDR (MCF_MBAR + 0x244)
93 #define MCFSIM_PADAT (MCF_MBAR + 0x248)
94
95
96
97
98 #define MCFDMA_BASE0 (MCF_MBAR + 0x300)
99 #define MCFDMA_BASE1 (MCF_MBAR + 0x340)
100 #define MCFDMA_BASE2 (MCF_MBAR + 0x380)
101 #define MCFDMA_BASE3 (MCF_MBAR + 0x3C0)
102
103
104
105
106 #define MCFGPIO_PIN_MAX 16
107 #define MCFGPIO_IRQ_MAX -1
108 #define MCFGPIO_IRQ_VECBASE -1
109
110
111
112
113 #define MCFSIM_SWDICR MCFSIM_ICR0
114 #define MCFSIM_TIMER1ICR MCFSIM_ICR1
115 #define MCFSIM_TIMER2ICR MCFSIM_ICR2
116 #define MCFSIM_I2CICR MCFSIM_ICR3
117 #define MCFSIM_UART1ICR MCFSIM_ICR4
118 #define MCFSIM_UART2ICR MCFSIM_ICR5
119 #define MCFSIM_DMA0ICR MCFSIM_ICR6
120 #define MCFSIM_DMA1ICR MCFSIM_ICR7
121 #define MCFSIM_DMA2ICR MCFSIM_ICR8
122 #define MCFSIM_DMA3ICR MCFSIM_ICR9
123
124
125
126
127 #define MCFSIM_PAR_DREQ0 0x40
128
129 #define MCFSIM_PAR_DREQ1 0x20
130
131
132
133
134
135 #define IRQ5_LEVEL4 0x80
136 #define IRQ3_LEVEL6 0x40
137 #define IRQ1_LEVEL2 0x20
138
139
140
141
142 #define MCF_IRQ_I2C0 29
143 #define MCF_IRQ_TIMER 30
144 #define MCF_IRQ_PROFILER 31
145 #define MCF_IRQ_UART0 73
146 #define MCF_IRQ_UART1 74
147
148
149
150
151 #define MCFI2C_BASE0 (MCF_MBAR + 0x280)
152 #define MCFI2C_SIZE0 0x40
153
154
155 #endif