diff options
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 251 |
1 files changed, 1 insertions, 250 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 1c34946ee16e..698aeec52961 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/ioport.h> | 23 | #include <linux/ioport.h> |
25 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
26 | #include <linux/string.h> | 25 | #include <linux/string.h> |
@@ -33,13 +32,7 @@ | |||
33 | 32 | ||
34 | #include <asm/arch/pxa-regs.h> | 33 | #include <asm/arch/pxa-regs.h> |
35 | #include <asm/arch/gpio.h> | 34 | #include <asm/arch/gpio.h> |
36 | #include <asm/arch/udc.h> | ||
37 | #include <asm/arch/pxafb.h> | ||
38 | #include <asm/arch/mmc.h> | ||
39 | #include <asm/arch/irda.h> | ||
40 | #include <asm/arch/i2c.h> | ||
41 | 35 | ||
42 | #include "devices.h" | ||
43 | #include "generic.h" | 36 | #include "generic.h" |
44 | 37 | ||
45 | /* | 38 | /* |
@@ -203,7 +196,7 @@ static struct map_desc standard_io_desc[] __initdata = { | |||
203 | }, { /* Mem Ctl */ | 196 | }, { /* Mem Ctl */ |
204 | .virtual = 0xf6000000, | 197 | .virtual = 0xf6000000, |
205 | .pfn = __phys_to_pfn(0x48000000), | 198 | .pfn = __phys_to_pfn(0x48000000), |
206 | .length = 0x00100000, | 199 | .length = 0x00200000, |
207 | .type = MT_DEVICE | 200 | .type = MT_DEVICE |
208 | }, { /* USB host */ | 201 | }, { /* USB host */ |
209 | .virtual = 0xf8000000, | 202 | .virtual = 0xf8000000, |
@@ -233,245 +226,3 @@ void __init pxa_map_io(void) | |||
233 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); | 226 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); |
234 | get_clk_frequency_khz(1); | 227 | get_clk_frequency_khz(1); |
235 | } | 228 | } |
236 | |||
237 | |||
238 | static struct resource pxamci_resources[] = { | ||
239 | [0] = { | ||
240 | .start = 0x41100000, | ||
241 | .end = 0x41100fff, | ||
242 | .flags = IORESOURCE_MEM, | ||
243 | }, | ||
244 | [1] = { | ||
245 | .start = IRQ_MMC, | ||
246 | .end = IRQ_MMC, | ||
247 | .flags = IORESOURCE_IRQ, | ||
248 | }, | ||
249 | }; | ||
250 | |||
251 | static u64 pxamci_dmamask = 0xffffffffUL; | ||
252 | |||
253 | struct platform_device pxa_device_mci = { | ||
254 | .name = "pxa2xx-mci", | ||
255 | .id = -1, | ||
256 | .dev = { | ||
257 | .dma_mask = &pxamci_dmamask, | ||
258 | .coherent_dma_mask = 0xffffffff, | ||
259 | }, | ||
260 | .num_resources = ARRAY_SIZE(pxamci_resources), | ||
261 | .resource = pxamci_resources, | ||
262 | }; | ||
263 | |||
264 | void __init pxa_set_mci_info(struct pxamci_platform_data *info) | ||
265 | { | ||
266 | pxa_device_mci.dev.platform_data = info; | ||
267 | } | ||
268 | |||
269 | |||
270 | static struct pxa2xx_udc_mach_info pxa_udc_info; | ||
271 | |||
272 | void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) | ||
273 | { | ||
274 | memcpy(&pxa_udc_info, info, sizeof *info); | ||
275 | } | ||
276 | |||
277 | static struct resource pxa2xx_udc_resources[] = { | ||
278 | [0] = { | ||
279 | .start = 0x40600000, | ||
280 | .end = 0x4060ffff, | ||
281 | .flags = IORESOURCE_MEM, | ||
282 | }, | ||
283 | [1] = { | ||
284 | .start = IRQ_USB, | ||
285 | .end = IRQ_USB, | ||
286 | .flags = IORESOURCE_IRQ, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | static u64 udc_dma_mask = ~(u32)0; | ||
291 | |||
292 | struct platform_device pxa_device_udc = { | ||
293 | .name = "pxa2xx-udc", | ||
294 | .id = -1, | ||
295 | .resource = pxa2xx_udc_resources, | ||
296 | .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), | ||
297 | .dev = { | ||
298 | .platform_data = &pxa_udc_info, | ||
299 | .dma_mask = &udc_dma_mask, | ||
300 | } | ||
301 | }; | ||
302 | |||
303 | static struct resource pxafb_resources[] = { | ||
304 | [0] = { | ||
305 | .start = 0x44000000, | ||
306 | .end = 0x4400ffff, | ||
307 | .flags = IORESOURCE_MEM, | ||
308 | }, | ||
309 | [1] = { | ||
310 | .start = IRQ_LCD, | ||
311 | .end = IRQ_LCD, | ||
312 | .flags = IORESOURCE_IRQ, | ||
313 | }, | ||
314 | }; | ||
315 | |||
316 | static u64 fb_dma_mask = ~(u64)0; | ||
317 | |||
318 | struct platform_device pxa_device_fb = { | ||
319 | .name = "pxa2xx-fb", | ||
320 | .id = -1, | ||
321 | .dev = { | ||
322 | .dma_mask = &fb_dma_mask, | ||
323 | .coherent_dma_mask = 0xffffffff, | ||
324 | }, | ||
325 | .num_resources = ARRAY_SIZE(pxafb_resources), | ||
326 | .resource = pxafb_resources, | ||
327 | }; | ||
328 | |||
329 | void __init set_pxa_fb_info(struct pxafb_mach_info *info) | ||
330 | { | ||
331 | pxa_device_fb.dev.platform_data = info; | ||
332 | } | ||
333 | |||
334 | void __init set_pxa_fb_parent(struct device *parent_dev) | ||
335 | { | ||
336 | pxa_device_fb.dev.parent = parent_dev; | ||
337 | } | ||
338 | |||
339 | static struct resource pxa_resource_ffuart[] = { | ||
340 | { | ||
341 | .start = __PREG(FFUART), | ||
342 | .end = __PREG(FFUART) + 35, | ||
343 | .flags = IORESOURCE_MEM, | ||
344 | }, { | ||
345 | .start = IRQ_FFUART, | ||
346 | .end = IRQ_FFUART, | ||
347 | .flags = IORESOURCE_IRQ, | ||
348 | } | ||
349 | }; | ||
350 | |||
351 | struct platform_device pxa_device_ffuart= { | ||
352 | .name = "pxa2xx-uart", | ||
353 | .id = 0, | ||
354 | .resource = pxa_resource_ffuart, | ||
355 | .num_resources = ARRAY_SIZE(pxa_resource_ffuart), | ||
356 | }; | ||
357 | |||
358 | static struct resource pxa_resource_btuart[] = { | ||
359 | { | ||
360 | .start = __PREG(BTUART), | ||
361 | .end = __PREG(BTUART) + 35, | ||
362 | .flags = IORESOURCE_MEM, | ||
363 | }, { | ||
364 | .start = IRQ_BTUART, | ||
365 | .end = IRQ_BTUART, | ||
366 | .flags = IORESOURCE_IRQ, | ||
367 | } | ||
368 | }; | ||
369 | |||
370 | struct platform_device pxa_device_btuart = { | ||
371 | .name = "pxa2xx-uart", | ||
372 | .id = 1, | ||
373 | .resource = pxa_resource_btuart, | ||
374 | .num_resources = ARRAY_SIZE(pxa_resource_btuart), | ||
375 | }; | ||
376 | |||
377 | static struct resource pxa_resource_stuart[] = { | ||
378 | { | ||
379 | .start = __PREG(STUART), | ||
380 | .end = __PREG(STUART) + 35, | ||
381 | .flags = IORESOURCE_MEM, | ||
382 | }, { | ||
383 | .start = IRQ_STUART, | ||
384 | .end = IRQ_STUART, | ||
385 | .flags = IORESOURCE_IRQ, | ||
386 | } | ||
387 | }; | ||
388 | |||
389 | struct platform_device pxa_device_stuart = { | ||
390 | .name = "pxa2xx-uart", | ||
391 | .id = 2, | ||
392 | .resource = pxa_resource_stuart, | ||
393 | .num_resources = ARRAY_SIZE(pxa_resource_stuart), | ||
394 | }; | ||
395 | |||
396 | static struct resource pxa_resource_hwuart[] = { | ||
397 | { | ||
398 | .start = __PREG(HWUART), | ||
399 | .end = __PREG(HWUART) + 47, | ||
400 | .flags = IORESOURCE_MEM, | ||
401 | }, { | ||
402 | .start = IRQ_HWUART, | ||
403 | .end = IRQ_HWUART, | ||
404 | .flags = IORESOURCE_IRQ, | ||
405 | } | ||
406 | }; | ||
407 | |||
408 | struct platform_device pxa_device_hwuart = { | ||
409 | .name = "pxa2xx-uart", | ||
410 | .id = 3, | ||
411 | .resource = pxa_resource_hwuart, | ||
412 | .num_resources = ARRAY_SIZE(pxa_resource_hwuart), | ||
413 | }; | ||
414 | |||
415 | static struct resource pxai2c_resources[] = { | ||
416 | { | ||
417 | .start = 0x40301680, | ||
418 | .end = 0x403016a3, | ||
419 | .flags = IORESOURCE_MEM, | ||
420 | }, { | ||
421 | .start = IRQ_I2C, | ||
422 | .end = IRQ_I2C, | ||
423 | .flags = IORESOURCE_IRQ, | ||
424 | }, | ||
425 | }; | ||
426 | |||
427 | struct platform_device pxa_device_i2c = { | ||
428 | .name = "pxa2xx-i2c", | ||
429 | .id = 0, | ||
430 | .resource = pxai2c_resources, | ||
431 | .num_resources = ARRAY_SIZE(pxai2c_resources), | ||
432 | }; | ||
433 | |||
434 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | ||
435 | { | ||
436 | pxa_device_i2c.dev.platform_data = info; | ||
437 | } | ||
438 | |||
439 | static struct resource pxai2s_resources[] = { | ||
440 | { | ||
441 | .start = 0x40400000, | ||
442 | .end = 0x40400083, | ||
443 | .flags = IORESOURCE_MEM, | ||
444 | }, { | ||
445 | .start = IRQ_I2S, | ||
446 | .end = IRQ_I2S, | ||
447 | .flags = IORESOURCE_IRQ, | ||
448 | }, | ||
449 | }; | ||
450 | |||
451 | struct platform_device pxa_device_i2s = { | ||
452 | .name = "pxa2xx-i2s", | ||
453 | .id = -1, | ||
454 | .resource = pxai2s_resources, | ||
455 | .num_resources = ARRAY_SIZE(pxai2s_resources), | ||
456 | }; | ||
457 | |||
458 | static u64 pxaficp_dmamask = ~(u32)0; | ||
459 | |||
460 | struct platform_device pxa_device_ficp = { | ||
461 | .name = "pxa2xx-ir", | ||
462 | .id = -1, | ||
463 | .dev = { | ||
464 | .dma_mask = &pxaficp_dmamask, | ||
465 | .coherent_dma_mask = 0xffffffff, | ||
466 | }, | ||
467 | }; | ||
468 | |||
469 | void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) | ||
470 | { | ||
471 | pxa_device_ficp.dev.platform_data = info; | ||
472 | } | ||
473 | |||
474 | struct platform_device pxa_device_rtc = { | ||
475 | .name = "sa1100-rtc", | ||
476 | .id = -1, | ||
477 | }; | ||