blob: 6ff3aab82fc3374c362951b82ab70d36315e3c16 [file] [log] [blame]
Kumar Gala8e8fff02005-09-03 15:55:34 -07001/*
2 * arch/ppc/syslib/pq2_devices.c
3 *
4 * PQ2 Device descriptions
5 *
Kumar Gala4c8d3d92005-11-13 16:06:30 -08006 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala8e8fff02005-09-03 15:55:34 -07007 *
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
11 */
12
13
14#include <linux/init.h>
15#include <linux/module.h>
Russell Kingd052d1b2005-10-29 19:07:23 +010016#include <linux/platform_device.h>
Kumar Gala8e8fff02005-09-03 15:55:34 -070017#include <linux/ioport.h>
18#include <asm/cpm2.h>
19#include <asm/irq.h>
20#include <asm/ppc_sys.h>
Paul Mackerrasfd582ec2005-10-11 22:08:12 +100021#include <asm/machdep.h>
Kumar Gala8e8fff02005-09-03 15:55:34 -070022
23struct platform_device ppc_sys_platform_devices[] = {
24 [MPC82xx_CPM_FCC1] = {
25 .name = "fsl-cpm-fcc",
26 .id = 1,
27 .num_resources = 3,
28 .resource = (struct resource[]) {
29 {
30 .name = "fcc_regs",
31 .start = 0x11300,
32 .end = 0x1131f,
33 .flags = IORESOURCE_MEM,
34 },
35 {
36 .name = "fcc_pram",
37 .start = 0x8400,
38 .end = 0x84ff,
39 .flags = IORESOURCE_MEM,
40 },
41 {
42 .start = SIU_INT_FCC1,
43 .end = SIU_INT_FCC1,
44 .flags = IORESOURCE_IRQ,
45 },
46 },
47 },
48 [MPC82xx_CPM_FCC2] = {
49 .name = "fsl-cpm-fcc",
50 .id = 2,
51 .num_resources = 3,
52 .resource = (struct resource[]) {
53 {
54 .name = "fcc_regs",
55 .start = 0x11320,
56 .end = 0x1133f,
57 .flags = IORESOURCE_MEM,
58 },
59 {
60 .name = "fcc_pram",
61 .start = 0x8500,
62 .end = 0x85ff,
63 .flags = IORESOURCE_MEM,
64 },
65 {
66 .start = SIU_INT_FCC2,
67 .end = SIU_INT_FCC2,
68 .flags = IORESOURCE_IRQ,
69 },
70 },
71 },
72 [MPC82xx_CPM_FCC3] = {
73 .name = "fsl-cpm-fcc",
74 .id = 3,
75 .num_resources = 3,
76 .resource = (struct resource[]) {
77 {
78 .name = "fcc_regs",
79 .start = 0x11340,
80 .end = 0x1135f,
81 .flags = IORESOURCE_MEM,
82 },
83 {
84 .name = "fcc_pram",
85 .start = 0x8600,
86 .end = 0x86ff,
87 .flags = IORESOURCE_MEM,
88 },
89 {
90 .start = SIU_INT_FCC3,
91 .end = SIU_INT_FCC3,
92 .flags = IORESOURCE_IRQ,
93 },
94 },
95 },
96 [MPC82xx_CPM_I2C] = {
97 .name = "fsl-cpm-i2c",
98 .id = 1,
99 .num_resources = 3,
100 .resource = (struct resource[]) {
101 {
102 .name = "i2c_mem",
103 .start = 0x11860,
104 .end = 0x118BF,
105 .flags = IORESOURCE_MEM,
106 },
107 {
108 .name = "i2c_pram",
109 .start = 0x8afc,
110 .end = 0x8afd,
111 .flags = IORESOURCE_MEM,
112 },
113 {
114 .start = SIU_INT_I2C,
115 .end = SIU_INT_I2C,
116 .flags = IORESOURCE_IRQ,
117 },
118 },
119 },
120 [MPC82xx_CPM_SCC1] = {
121 .name = "fsl-cpm-scc",
122 .id = 1,
123 .num_resources = 3,
124 .resource = (struct resource[]) {
125 {
126 .name = "scc_mem",
127 .start = 0x11A00,
128 .end = 0x11A1F,
129 .flags = IORESOURCE_MEM,
130 },
131 {
132 .name = "scc_pram",
133 .start = 0x8000,
134 .end = 0x80ff,
135 .flags = IORESOURCE_MEM,
136 },
137 {
138 .start = SIU_INT_SCC1,
139 .end = SIU_INT_SCC1,
140 .flags = IORESOURCE_IRQ,
141 },
142 },
143 },
144 [MPC82xx_CPM_SCC2] = {
145 .name = "fsl-cpm-scc",
146 .id = 2,
147 .num_resources = 3,
148 .resource = (struct resource[]) {
149 {
150 .name = "scc_mem",
151 .start = 0x11A20,
152 .end = 0x11A3F,
153 .flags = IORESOURCE_MEM,
154 },
155 {
156 .name = "scc_pram",
157 .start = 0x8100,
158 .end = 0x81ff,
159 .flags = IORESOURCE_MEM,
160 },
161 {
162 .start = SIU_INT_SCC2,
163 .end = SIU_INT_SCC2,
164 .flags = IORESOURCE_IRQ,
165 },
166 },
167 },
168 [MPC82xx_CPM_SCC3] = {
169 .name = "fsl-cpm-scc",
170 .id = 3,
171 .num_resources = 3,
172 .resource = (struct resource[]) {
173 {
174 .name = "scc_mem",
175 .start = 0x11A40,
176 .end = 0x11A5F,
177 .flags = IORESOURCE_MEM,
178 },
179 {
180 .name = "scc_pram",
181 .start = 0x8200,
182 .end = 0x82ff,
183 .flags = IORESOURCE_MEM,
184 },
185 {
186 .start = SIU_INT_SCC3,
187 .end = SIU_INT_SCC3,
188 .flags = IORESOURCE_IRQ,
189 },
190 },
191 },
192 [MPC82xx_CPM_SCC4] = {
193 .name = "fsl-cpm-scc",
194 .id = 4,
195 .num_resources = 3,
196 .resource = (struct resource[]) {
197 {
198 .name = "scc_mem",
199 .start = 0x11A60,
200 .end = 0x11A7F,
201 .flags = IORESOURCE_MEM,
202 },
203 {
204 .name = "scc_pram",
205 .start = 0x8300,
206 .end = 0x83ff,
207 .flags = IORESOURCE_MEM,
208 },
209 {
210 .start = SIU_INT_SCC4,
211 .end = SIU_INT_SCC4,
212 .flags = IORESOURCE_IRQ,
213 },
214 },
215 },
216 [MPC82xx_CPM_SPI] = {
217 .name = "fsl-cpm-spi",
218 .id = 1,
219 .num_resources = 3,
220 .resource = (struct resource[]) {
221 {
222 .name = "spi_mem",
223 .start = 0x11AA0,
224 .end = 0x11AFF,
225 .flags = IORESOURCE_MEM,
226 },
227 {
228 .name = "spi_pram",
229 .start = 0x89fc,
230 .end = 0x89fd,
231 .flags = IORESOURCE_MEM,
232 },
233 {
234 .start = SIU_INT_SPI,
235 .end = SIU_INT_SPI,
236 .flags = IORESOURCE_IRQ,
237 },
238 },
239 },
240 [MPC82xx_CPM_MCC1] = {
241 .name = "fsl-cpm-mcc",
242 .id = 1,
243 .num_resources = 3,
244 .resource = (struct resource[]) {
245 {
246 .name = "mcc_mem",
247 .start = 0x11B30,
248 .end = 0x11B3F,
249 .flags = IORESOURCE_MEM,
250 },
251 {
252 .name = "mcc_pram",
253 .start = 0x8700,
254 .end = 0x877f,
255 .flags = IORESOURCE_MEM,
256 },
257 {
258 .start = SIU_INT_MCC1,
259 .end = SIU_INT_MCC1,
260 .flags = IORESOURCE_IRQ,
261 },
262 },
263 },
264 [MPC82xx_CPM_MCC2] = {
265 .name = "fsl-cpm-mcc",
266 .id = 2,
267 .num_resources = 3,
268 .resource = (struct resource[]) {
269 {
270 .name = "mcc_mem",
271 .start = 0x11B50,
272 .end = 0x11B5F,
273 .flags = IORESOURCE_MEM,
274 },
275 {
276 .name = "mcc_pram",
277 .start = 0x8800,
278 .end = 0x887f,
279 .flags = IORESOURCE_MEM,
280 },
281 {
282 .start = SIU_INT_MCC2,
283 .end = SIU_INT_MCC2,
284 .flags = IORESOURCE_IRQ,
285 },
286 },
287 },
288 [MPC82xx_CPM_SMC1] = {
289 .name = "fsl-cpm-smc",
290 .id = 1,
291 .num_resources = 3,
292 .resource = (struct resource[]) {
293 {
294 .name = "smc_mem",
295 .start = 0x11A80,
296 .end = 0x11A8F,
297 .flags = IORESOURCE_MEM,
298 },
299 {
300 .name = "smc_pram",
301 .start = 0x87fc,
302 .end = 0x87fd,
303 .flags = IORESOURCE_MEM,
304 },
305 {
306 .start = SIU_INT_SMC1,
307 .end = SIU_INT_SMC1,
308 .flags = IORESOURCE_IRQ,
309 },
310 },
311 },
312 [MPC82xx_CPM_SMC2] = {
313 .name = "fsl-cpm-smc",
314 .id = 2,
315 .num_resources = 3,
316 .resource = (struct resource[]) {
317 {
318 .name = "smc_mem",
319 .start = 0x11A90,
320 .end = 0x11A9F,
321 .flags = IORESOURCE_MEM,
322 },
323 {
324 .name = "smc_pram",
325 .start = 0x88fc,
326 .end = 0x88fd,
327 .flags = IORESOURCE_MEM,
328 },
329 {
330 .start = SIU_INT_SMC2,
331 .end = SIU_INT_SMC2,
332 .flags = IORESOURCE_IRQ,
333 },
334 },
335 },
336 [MPC82xx_CPM_USB] = {
337 .name = "fsl-cpm-usb",
338 .id = 1,
339 .num_resources = 3,
340 .resource = (struct resource[]) {
341 {
342 .name = "usb_mem",
343 .start = 0x11b60,
344 .end = 0x11b78,
345 .flags = IORESOURCE_MEM,
346 },
347 {
348 .name = "usb_pram",
349 .start = 0x8b00,
350 .end = 0x8bff,
351 .flags = IORESOURCE_MEM,
352 },
353 {
354 .start = SIU_INT_USB,
355 .end = SIU_INT_USB,
356 .flags = IORESOURCE_IRQ,
357 },
358
359 },
360 },
361 [MPC82xx_SEC1] = {
362 .name = "fsl-sec",
363 .id = 1,
364 .num_resources = 1,
365 .resource = (struct resource[]) {
366 {
367 .name = "sec_mem",
368 .start = 0x40000,
369 .end = 0x52fff,
370 .flags = IORESOURCE_MEM,
371 },
372 },
373 },
374};
375
376static int __init mach_mpc82xx_fixup(struct platform_device *pdev)
377{
378 ppc_sys_fixup_mem_resource(pdev, CPM_MAP_ADDR);
379 return 0;
380}
381
382static int __init mach_mpc82xx_init(void)
383{
384 if (ppc_md.progress)
385 ppc_md.progress("mach_mpc82xx_init:enter", 0);
386 ppc_sys_device_fixup = mach_mpc82xx_fixup;
387 return 0;
388}
389
390postcore_initcall(mach_mpc82xx_init);