From 48f6b0999673cce33e4a54d89c78460cc28e5156 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 2 Mar 2011 09:27:42 +0100 Subject: ARM i.MX: introduce imx_otg_ulpi_create to create ULPI transceivers The boards are currently using otg_ulpi_create and mxc_ulpi_access_ops, both are only present if CONFIG_USB_ULPI is set. To remove the need of ifdefs in the board code introduce a imx_otg_ulpi_create functions which expands to a static inline function if compiled without ulpi. Signed-off-by: Sascha Hauer --- arch/arm/mach-mx5/board-mx51_efikasb.c | 8 ++++---- arch/arm/mach-mx5/mx51_efika.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'arch/arm/mach-mx5') diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 18e29b9..db04ce84 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c @@ -129,10 +129,10 @@ static struct mxc_usbh_platform_data usbh2_config = { static void __init mx51_efikasb_usb(void) { - usbh2_config.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT | - ULPI_OTG_EXTVBUSIND); - mxc_register_device(&mxc_usbh2_device, &usbh2_config); + usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | + ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); + if (usbh2_config.otg) + mxc_register_device(&mxc_usbh2_device, &usbh2_config); } static struct gpio_led mx51_efikasb_leds[] = { diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index 74991c9..51a67fc 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c @@ -218,12 +218,12 @@ static void __init mx51_efika_usb(void) msleep(1); gpio_set_value(EFIKA_USB_PHY_RESET, 1); - usbh1_config.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT | - ULPI_OTG_EXTVBUSIND); + usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | + ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); - mxc_register_device(&mxc_usbh1_device, &usbh1_config); + if (usbh1_config.otg) + mxc_register_device(&mxc_usbh1_device, &usbh1_config); } static struct mtd_partition mx51_efika_spi_nor_partitions[] = { -- cgit v1.1