aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx2/devices.c
diff options
context:
space:
mode:
authorjavier Martin <javier.martin@vista-silicon.com>2009-07-15 09:26:21 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-08-07 06:11:12 -0400
commit627fb3b9d260cb413d0ea2d179e319a20e2bd82b (patch)
treed7c86333c3ac55be48669c3e397b619c5d207b38 /arch/arm/mach-mx2/devices.c
parent88e29a8d21fb9687ad6972a44571b295acaf0d74 (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.c92
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
372static 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
384static u64 otg_dmamask = 0xffffffffUL;
385
386/* OTG gadget device */
387struct 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 */
399struct 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
412static u64 usbh1_dmamask = 0xffffffffUL;
413
414static 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
426struct 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 */
438static u64 usbh2_dmamask = 0xffffffffUL;
439
440static 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
452struct 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 */
373static struct mxc_gpio_port imx_gpio_ports[] = { 465static struct mxc_gpio_port imx_gpio_ports[] = {
374 { 466 {