diff options
Diffstat (limited to 'arch/arm/mach-mx3/mach-pcm037.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm037.c | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index b752f6bc20a..f07d3bded67 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -533,17 +533,25 @@ static struct platform_device pcm970_sja1000 = { | |||
533 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), | 533 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), |
534 | }; | 534 | }; |
535 | 535 | ||
536 | #if defined(CONFIG_USB_ULPI) | 536 | static int pcm037_otg_init(struct platform_device *pdev) |
537 | { | ||
538 | return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI); | ||
539 | } | ||
540 | |||
537 | static struct mxc_usbh_platform_data otg_pdata __initdata = { | 541 | static struct mxc_usbh_platform_data otg_pdata __initdata = { |
542 | .init = pcm037_otg_init, | ||
538 | .portsc = MXC_EHCI_MODE_ULPI, | 543 | .portsc = MXC_EHCI_MODE_ULPI, |
539 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
540 | }; | 544 | }; |
541 | 545 | ||
546 | static int pcm037_usbh2_init(struct platform_device *pdev) | ||
547 | { | ||
548 | return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI); | ||
549 | } | ||
550 | |||
542 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { | 551 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { |
552 | .init = pcm037_usbh2_init, | ||
543 | .portsc = MXC_EHCI_MODE_ULPI, | 553 | .portsc = MXC_EHCI_MODE_ULPI, |
544 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
545 | }; | 554 | }; |
546 | #endif | ||
547 | 555 | ||
548 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | 556 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { |
549 | .operating_mode = FSL_USB2_DR_DEVICE, | 557 | .operating_mode = FSL_USB2_DR_DEVICE, |
@@ -568,7 +576,7 @@ __setup("otg_mode=", pcm037_otg_mode); | |||
568 | /* | 576 | /* |
569 | * Board specific initialization. | 577 | * Board specific initialization. |
570 | */ | 578 | */ |
571 | static void __init mxc_board_init(void) | 579 | static void __init pcm037_init(void) |
572 | { | 580 | { |
573 | int ret; | 581 | int ret; |
574 | 582 | ||
@@ -646,19 +654,18 @@ static void __init mxc_board_init(void) | |||
646 | 654 | ||
647 | platform_device_register(&pcm970_sja1000); | 655 | platform_device_register(&pcm970_sja1000); |
648 | 656 | ||
649 | #if defined(CONFIG_USB_ULPI) | ||
650 | if (otg_mode_host) { | 657 | if (otg_mode_host) { |
651 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 658 | otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
652 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 659 | ULPI_OTG_DRVVBUS_EXT); |
653 | 660 | if (otg_pdata.otg) | |
654 | imx31_add_mxc_ehci_otg(&otg_pdata); | 661 | imx31_add_mxc_ehci_otg(&otg_pdata); |
655 | } | 662 | } |
656 | 663 | ||
657 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 664 | usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
658 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 665 | ULPI_OTG_DRVVBUS_EXT); |
666 | if (usbh2_pdata.otg) | ||
667 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | ||
659 | 668 | ||
660 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | ||
661 | #endif | ||
662 | if (!otg_mode_host) | 669 | if (!otg_mode_host) |
663 | imx31_add_fsl_usb2_udc(&otg_device_pdata); | 670 | imx31_add_fsl_usb2_udc(&otg_device_pdata); |
664 | 671 | ||
@@ -675,9 +682,10 @@ struct sys_timer pcm037_timer = { | |||
675 | 682 | ||
676 | MACHINE_START(PCM037, "Phytec Phycore pcm037") | 683 | MACHINE_START(PCM037, "Phytec Phycore pcm037") |
677 | /* Maintainer: Pengutronix */ | 684 | /* Maintainer: Pengutronix */ |
678 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 685 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
679 | .map_io = mx31_map_io, | 686 | .map_io = mx31_map_io, |
680 | .init_irq = mx31_init_irq, | 687 | .init_early = imx31_init_early, |
681 | .init_machine = mxc_board_init, | 688 | .init_irq = mx31_init_irq, |
682 | .timer = &pcm037_timer, | 689 | .timer = &pcm037_timer, |
690 | .init_machine = pcm037_init, | ||
683 | MACHINE_END | 691 | MACHINE_END |