aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/usb-host.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2013-09-24 11:53:49 +0300
committerFelipe Balbi <balbi@ti.com>2013-10-04 09:29:10 -0500
commit67c8d0636445da59b27697f380a7e2089c5707eb (patch)
treec3d25cb982544ce66ebfa98834caaa1c6026acac /arch/arm/mach-omap2/usb-host.c
parentbd27fa44e13830d2baa278d5702e766380659cb3 (diff)
ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data
The platform data bits can be inferred from the other members of struct usbhs_phy_data. So get rid of the platform_data member. Build the platform data for the PHY device in usbhs_init_phys() instead. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/usb-host.c')
-rw-r--r--arch/arm/mach-omap2/usb-host.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index e83a6a4b184..78ac1c211ec 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -435,6 +435,7 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
struct platform_device *pdev;
char *phy_id;
struct platform_device_info pdevinfo;
+ struct usb_phy_gen_xceiv_platform_data nop_pdata;
for (i = 0; i < num_phys; i++) {
@@ -455,11 +456,19 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
return -ENOMEM;
}
+ /* set platform data */
+ memset(&nop_pdata, 0, sizeof(nop_pdata));
+ if (gpio_is_valid(phy->vcc_gpio))
+ nop_pdata.needs_vcc = true;
+ if (gpio_is_valid(phy->reset_gpio))
+ nop_pdata.needs_reset = true;
+ nop_pdata.type = USB_PHY_TYPE_USB2;
+
/* create a NOP PHY device */
memset(&pdevinfo, 0, sizeof(pdevinfo));
pdevinfo.name = nop_name;
pdevinfo.id = phy->port;
- pdevinfo.data = phy->platform_data;
+ pdevinfo.data = &nop_pdata;
pdevinfo.size_data =
sizeof(struct usb_phy_gen_xceiv_platform_data);
scnprintf(phy_id, MAX_STR, "usb_phy_gen_xceiv.%d",