diff options
Diffstat (limited to 'arch/arm/mach-mx3/mach-armadillo5x0.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-armadillo5x0.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 28b6f414b5d5..226829bf7c25 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -133,7 +133,6 @@ static int armadillo5x0_pins[] = { | |||
133 | }; | 133 | }; |
134 | 134 | ||
135 | /* USB */ | 135 | /* USB */ |
136 | #if defined(CONFIG_USB_ULPI) | ||
137 | 136 | ||
138 | #define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4) | 137 | #define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4) |
139 | #define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6) | 138 | #define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6) |
@@ -176,8 +175,10 @@ static int usbotg_init(struct platform_device *pdev) | |||
176 | gpio_set_value(OTG_RESET, 0/*LOW*/); | 175 | gpio_set_value(OTG_RESET, 0/*LOW*/); |
177 | mdelay(5); | 176 | mdelay(5); |
178 | gpio_set_value(OTG_RESET, 1/*HIGH*/); | 177 | gpio_set_value(OTG_RESET, 1/*HIGH*/); |
178 | mdelay(10); | ||
179 | 179 | ||
180 | return 0; | 180 | return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED | |
181 | MXC_EHCI_INTERFACE_DIFF_UNI); | ||
181 | 182 | ||
182 | otg_free_reset: | 183 | otg_free_reset: |
183 | gpio_free(OTG_RESET); | 184 | gpio_free(OTG_RESET); |
@@ -233,8 +234,10 @@ static int usbh2_init(struct platform_device *pdev) | |||
233 | gpio_set_value(USBH2_RESET, 0/*LOW*/); | 234 | gpio_set_value(USBH2_RESET, 0/*LOW*/); |
234 | mdelay(5); | 235 | mdelay(5); |
235 | gpio_set_value(USBH2_RESET, 1/*HIGH*/); | 236 | gpio_set_value(USBH2_RESET, 1/*HIGH*/); |
237 | mdelay(10); | ||
236 | 238 | ||
237 | return 0; | 239 | return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED | |
240 | MXC_EHCI_INTERFACE_DIFF_UNI); | ||
238 | 241 | ||
239 | h2_free_reset: | 242 | h2_free_reset: |
240 | gpio_free(USBH2_RESET); | 243 | gpio_free(USBH2_RESET); |
@@ -246,15 +249,12 @@ h2_free_cs: | |||
246 | static struct mxc_usbh_platform_data usbotg_pdata __initdata = { | 249 | static struct mxc_usbh_platform_data usbotg_pdata __initdata = { |
247 | .init = usbotg_init, | 250 | .init = usbotg_init, |
248 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 251 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
249 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | ||
250 | }; | 252 | }; |
251 | 253 | ||
252 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { | 254 | static struct mxc_usbh_platform_data usbh2_pdata __initdata = { |
253 | .init = usbh2_init, | 255 | .init = usbh2_init, |
254 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 256 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
255 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | ||
256 | }; | 257 | }; |
257 | #endif /* CONFIG_USB_ULPI */ | ||
258 | 258 | ||
259 | /* RTC over I2C*/ | 259 | /* RTC over I2C*/ |
260 | #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) | 260 | #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) |
@@ -547,15 +547,15 @@ static void __init armadillo5x0_init(void) | |||
547 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); | 547 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); |
548 | 548 | ||
549 | /* USB */ | 549 | /* USB */ |
550 | #if defined(CONFIG_USB_ULPI) | 550 | |
551 | usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 551 | usbotg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | |
552 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 552 | ULPI_OTG_DRVVBUS_EXT); |
553 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 553 | if (usbotg_pdata.otg) |
554 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 554 | imx31_add_mxc_ehci_otg(&usbotg_pdata); |
555 | 555 | usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | |
556 | imx31_add_mxc_ehci_otg(&usbotg_pdata); | 556 | ULPI_OTG_DRVVBUS_EXT); |
557 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | 557 | if (usbh2_pdata.otg) |
558 | #endif | 558 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
559 | } | 559 | } |
560 | 560 | ||
561 | static void __init armadillo5x0_timer_init(void) | 561 | static void __init armadillo5x0_timer_init(void) |
@@ -569,9 +569,10 @@ static struct sys_timer armadillo5x0_timer = { | |||
569 | 569 | ||
570 | MACHINE_START(ARMADILLO5X0, "Armadillo-500") | 570 | MACHINE_START(ARMADILLO5X0, "Armadillo-500") |
571 | /* Maintainer: Alberto Panizzo */ | 571 | /* Maintainer: Alberto Panizzo */ |
572 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 572 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
573 | .map_io = mx31_map_io, | 573 | .map_io = mx31_map_io, |
574 | .init_irq = mx31_init_irq, | 574 | .init_early = imx31_init_early, |
575 | .timer = &armadillo5x0_timer, | 575 | .init_irq = mx31_init_irq, |
576 | .init_machine = armadillo5x0_init, | 576 | .timer = &armadillo5x0_timer, |
577 | .init_machine = armadillo5x0_init, | ||
577 | MACHINE_END | 578 | MACHINE_END |