diff options
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 90 |
1 files changed, 18 insertions, 72 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 147b7c40d9f9..a496e498ef57 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -242,7 +242,7 @@ static struct resource pxamci_resources[] = { | |||
242 | 242 | ||
243 | static u64 pxamci_dmamask = 0xffffffffUL; | 243 | static u64 pxamci_dmamask = 0xffffffffUL; |
244 | 244 | ||
245 | static struct platform_device pxamci_device = { | 245 | struct platform_device pxamci_device = { |
246 | .name = "pxa2xx-mci", | 246 | .name = "pxa2xx-mci", |
247 | .id = -1, | 247 | .id = -1, |
248 | .dev = { | 248 | .dev = { |
@@ -281,7 +281,7 @@ static struct resource pxa2xx_udc_resources[] = { | |||
281 | 281 | ||
282 | static u64 udc_dma_mask = ~(u32)0; | 282 | static u64 udc_dma_mask = ~(u32)0; |
283 | 283 | ||
284 | static struct platform_device udc_device = { | 284 | struct platform_device pxaudc_device = { |
285 | .name = "pxa2xx-udc", | 285 | .name = "pxa2xx-udc", |
286 | .id = -1, | 286 | .id = -1, |
287 | .resource = pxa2xx_udc_resources, | 287 | .resource = pxa2xx_udc_resources, |
@@ -307,7 +307,7 @@ static struct resource pxafb_resources[] = { | |||
307 | 307 | ||
308 | static u64 fb_dma_mask = ~(u64)0; | 308 | static u64 fb_dma_mask = ~(u64)0; |
309 | 309 | ||
310 | static struct platform_device pxafb_device = { | 310 | struct platform_device pxafb_device = { |
311 | .name = "pxa2xx-fb", | 311 | .name = "pxa2xx-fb", |
312 | .id = -1, | 312 | .id = -1, |
313 | .dev = { | 313 | .dev = { |
@@ -328,24 +328,24 @@ void __init set_pxa_fb_parent(struct device *parent_dev) | |||
328 | pxafb_device.dev.parent = parent_dev; | 328 | pxafb_device.dev.parent = parent_dev; |
329 | } | 329 | } |
330 | 330 | ||
331 | static struct platform_device ffuart_device = { | 331 | struct platform_device ffuart_device = { |
332 | .name = "pxa2xx-uart", | 332 | .name = "pxa2xx-uart", |
333 | .id = 0, | 333 | .id = 0, |
334 | }; | 334 | }; |
335 | static struct platform_device btuart_device = { | 335 | struct platform_device btuart_device = { |
336 | .name = "pxa2xx-uart", | 336 | .name = "pxa2xx-uart", |
337 | .id = 1, | 337 | .id = 1, |
338 | }; | 338 | }; |
339 | static struct platform_device stuart_device = { | 339 | struct platform_device stuart_device = { |
340 | .name = "pxa2xx-uart", | 340 | .name = "pxa2xx-uart", |
341 | .id = 2, | 341 | .id = 2, |
342 | }; | 342 | }; |
343 | static struct platform_device hwuart_device = { | 343 | struct platform_device hwuart_device = { |
344 | .name = "pxa2xx-uart", | 344 | .name = "pxa2xx-uart", |
345 | .id = 3, | 345 | .id = 3, |
346 | }; | 346 | }; |
347 | 347 | ||
348 | static struct resource i2c_resources[] = { | 348 | static struct resource pxai2c_resources[] = { |
349 | { | 349 | { |
350 | .start = 0x40301680, | 350 | .start = 0x40301680, |
351 | .end = 0x403016a3, | 351 | .end = 0x403016a3, |
@@ -357,40 +357,19 @@ static struct resource i2c_resources[] = { | |||
357 | }, | 357 | }, |
358 | }; | 358 | }; |
359 | 359 | ||
360 | static struct platform_device i2c_device = { | 360 | struct platform_device pxai2c_device = { |
361 | .name = "pxa2xx-i2c", | 361 | .name = "pxa2xx-i2c", |
362 | .id = 0, | 362 | .id = 0, |
363 | .resource = i2c_resources, | 363 | .resource = pxai2c_resources, |
364 | .num_resources = ARRAY_SIZE(i2c_resources), | 364 | .num_resources = ARRAY_SIZE(pxai2c_resources), |
365 | }; | 365 | }; |
366 | 366 | ||
367 | #ifdef CONFIG_PXA27x | ||
368 | static struct resource i2c_power_resources[] = { | ||
369 | { | ||
370 | .start = 0x40f00180, | ||
371 | .end = 0x40f001a3, | ||
372 | .flags = IORESOURCE_MEM, | ||
373 | }, { | ||
374 | .start = IRQ_PWRI2C, | ||
375 | .end = IRQ_PWRI2C, | ||
376 | .flags = IORESOURCE_IRQ, | ||
377 | }, | ||
378 | }; | ||
379 | |||
380 | static struct platform_device i2c_power_device = { | ||
381 | .name = "pxa2xx-i2c", | ||
382 | .id = 1, | ||
383 | .resource = i2c_power_resources, | ||
384 | .num_resources = ARRAY_SIZE(i2c_resources), | ||
385 | }; | ||
386 | #endif | ||
387 | |||
388 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | 367 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) |
389 | { | 368 | { |
390 | i2c_device.dev.platform_data = info; | 369 | pxai2c_device.dev.platform_data = info; |
391 | } | 370 | } |
392 | 371 | ||
393 | static struct resource i2s_resources[] = { | 372 | static struct resource pxai2s_resources[] = { |
394 | { | 373 | { |
395 | .start = 0x40400000, | 374 | .start = 0x40400000, |
396 | .end = 0x40400083, | 375 | .end = 0x40400083, |
@@ -402,16 +381,16 @@ static struct resource i2s_resources[] = { | |||
402 | }, | 381 | }, |
403 | }; | 382 | }; |
404 | 383 | ||
405 | static struct platform_device i2s_device = { | 384 | struct platform_device pxai2s_device = { |
406 | .name = "pxa2xx-i2s", | 385 | .name = "pxa2xx-i2s", |
407 | .id = -1, | 386 | .id = -1, |
408 | .resource = i2s_resources, | 387 | .resource = pxai2s_resources, |
409 | .num_resources = ARRAY_SIZE(i2s_resources), | 388 | .num_resources = ARRAY_SIZE(pxai2s_resources), |
410 | }; | 389 | }; |
411 | 390 | ||
412 | static u64 pxaficp_dmamask = ~(u32)0; | 391 | static u64 pxaficp_dmamask = ~(u32)0; |
413 | 392 | ||
414 | static struct platform_device pxaficp_device = { | 393 | struct platform_device pxaficp_device = { |
415 | .name = "pxa2xx-ir", | 394 | .name = "pxa2xx-ir", |
416 | .id = -1, | 395 | .id = -1, |
417 | .dev = { | 396 | .dev = { |
@@ -425,40 +404,7 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) | |||
425 | pxaficp_device.dev.platform_data = info; | 404 | pxaficp_device.dev.platform_data = info; |
426 | } | 405 | } |
427 | 406 | ||
428 | static struct platform_device pxartc_device = { | 407 | struct platform_device pxartc_device = { |
429 | .name = "sa1100-rtc", | 408 | .name = "sa1100-rtc", |
430 | .id = -1, | 409 | .id = -1, |
431 | }; | 410 | }; |
432 | |||
433 | static struct platform_device *devices[] __initdata = { | ||
434 | &pxamci_device, | ||
435 | &udc_device, | ||
436 | &pxafb_device, | ||
437 | &ffuart_device, | ||
438 | &btuart_device, | ||
439 | &stuart_device, | ||
440 | &pxaficp_device, | ||
441 | &i2c_device, | ||
442 | #ifdef CONFIG_PXA27x | ||
443 | &i2c_power_device, | ||
444 | #endif | ||
445 | &i2s_device, | ||
446 | &pxartc_device, | ||
447 | }; | ||
448 | |||
449 | static int __init pxa_init(void) | ||
450 | { | ||
451 | int ret; | ||
452 | |||
453 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
454 | if (ret) | ||
455 | return ret; | ||
456 | |||
457 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | ||
458 | if (cpu_is_pxa25x()) | ||
459 | ret = platform_device_register(&hwuart_device); | ||
460 | |||
461 | return ret; | ||
462 | } | ||
463 | |||
464 | subsys_initcall(pxa_init); | ||