]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-omap2/usb-host.c
ARM: OMAP2+: omap-usb-host: Get rid of platform_data from struct usbhs_phy_data
[karo-tx-linux.git] / arch / arm / mach-omap2 / usb-host.c
index e83a6a4b184af23c315a5e509a56ba8362d820e7..78ac1c211eceb84a32aea4be2ace83a514ff5889 100644 (file)
@@ -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",