diff options
author | javier Martin <javier.martin@vista-silicon.com> | 2009-07-15 09:26:21 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-07 06:11:12 -0400 |
commit | 627fb3b9d260cb413d0ea2d179e319a20e2bd82b (patch) | |
tree | d7c86333c3ac55be48669c3e397b619c5d207b38 /arch/arm/mach-mx2/devices.c | |
parent | 88e29a8d21fb9687ad6972a44571b295acaf0d74 (diff) |
MX27: Add USB platform devices and resources
This adds clocks and resources for usb in i.mx27 SoC.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx2/devices.c')
-rw-r--r-- | arch/arm/mach-mx2/devices.c | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index cbf42467466d..4ecf0977beb4 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c | |||
@@ -369,6 +369,98 @@ struct platform_device mxc_sdhc_device1 = { | |||
369 | .resource = mxc_sdhc2_resources, | 369 | .resource = mxc_sdhc2_resources, |
370 | }; | 370 | }; |
371 | 371 | ||
372 | static struct resource otg_resources[] = { | ||
373 | { | ||
374 | .start = OTG_BASE_ADDR, | ||
375 | .end = OTG_BASE_ADDR + 0x1ff, | ||
376 | .flags = IORESOURCE_MEM, | ||
377 | }, { | ||
378 | .start = MXC_INT_USB3, | ||
379 | .end = MXC_INT_USB3, | ||
380 | .flags = IORESOURCE_IRQ, | ||
381 | }, | ||
382 | }; | ||
383 | |||
384 | static u64 otg_dmamask = 0xffffffffUL; | ||
385 | |||
386 | /* OTG gadget device */ | ||
387 | struct platform_device mxc_otg_udc_device = { | ||
388 | .name = "fsl-usb2-udc", | ||
389 | .id = -1, | ||
390 | .dev = { | ||
391 | .dma_mask = &otg_dmamask, | ||
392 | .coherent_dma_mask = 0xffffffffUL, | ||
393 | }, | ||
394 | .resource = otg_resources, | ||
395 | .num_resources = ARRAY_SIZE(otg_resources), | ||
396 | }; | ||
397 | |||
398 | /* OTG host */ | ||
399 | struct platform_device mxc_otg_host = { | ||
400 | .name = "mxc-ehci", | ||
401 | .id = 0, | ||
402 | .dev = { | ||
403 | .coherent_dma_mask = 0xffffffff, | ||
404 | .dma_mask = &otg_dmamask, | ||
405 | }, | ||
406 | .resource = otg_resources, | ||
407 | .num_resources = ARRAY_SIZE(otg_resources), | ||
408 | }; | ||
409 | |||
410 | /* USB host 1 */ | ||
411 | |||
412 | static u64 usbh1_dmamask = 0xffffffffUL; | ||
413 | |||
414 | static struct resource mxc_usbh1_resources[] = { | ||
415 | { | ||
416 | .start = OTG_BASE_ADDR + 0x200, | ||
417 | .end = OTG_BASE_ADDR + 0x3ff, | ||
418 | .flags = IORESOURCE_MEM, | ||
419 | }, { | ||
420 | .start = MXC_INT_USB1, | ||
421 | .end = MXC_INT_USB1, | ||
422 | .flags = IORESOURCE_IRQ, | ||
423 | }, | ||
424 | }; | ||
425 | |||
426 | struct platform_device mxc_usbh1 = { | ||
427 | .name = "mxc-ehci", | ||
428 | .id = 1, | ||
429 | .dev = { | ||
430 | .coherent_dma_mask = 0xffffffff, | ||
431 | .dma_mask = &usbh1_dmamask, | ||
432 | }, | ||
433 | .resource = mxc_usbh1_resources, | ||
434 | .num_resources = ARRAY_SIZE(mxc_usbh1_resources), | ||
435 | }; | ||
436 | |||
437 | /* USB host 2 */ | ||
438 | static u64 usbh2_dmamask = 0xffffffffUL; | ||
439 | |||
440 | static struct resource mxc_usbh2_resources[] = { | ||
441 | { | ||
442 | .start = OTG_BASE_ADDR + 0x400, | ||
443 | .end = OTG_BASE_ADDR + 0x5ff, | ||
444 | .flags = IORESOURCE_MEM, | ||
445 | }, { | ||
446 | .start = MXC_INT_USB2, | ||
447 | .end = MXC_INT_USB2, | ||
448 | .flags = IORESOURCE_IRQ, | ||
449 | }, | ||
450 | }; | ||
451 | |||
452 | struct platform_device mxc_usbh2 = { | ||
453 | .name = "mxc-ehci", | ||
454 | .id = 2, | ||
455 | .dev = { | ||
456 | .coherent_dma_mask = 0xffffffff, | ||
457 | .dma_mask = &usbh2_dmamask, | ||
458 | }, | ||
459 | .resource = mxc_usbh2_resources, | ||
460 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), | ||
461 | }; | ||
462 | |||
463 | |||
372 | /* GPIO port description */ | 464 | /* GPIO port description */ |
373 | static struct mxc_gpio_port imx_gpio_ports[] = { | 465 | static struct mxc_gpio_port imx_gpio_ports[] = { |
374 | { | 466 | { |