]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
usb: xilinx: Fix ZED_USB_OTG option
authorMichal Simek <michal.simek@xilinx.com>
Mon, 19 Nov 2012 12:06:23 +0000 (13:06 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Sun, 2 Dec 2012 19:37:09 +0000 (20:37 +0100)
Do not select option if USB_SUPPORT is enabled because
this option depends on it.
Add dependency on XUSBPS_OTG.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-xilinx-usbps.c
drivers/usb/host/ehci.h
drivers/usb/otg/Kconfig

index 5dfc00ce80092ff1b5990687507434c8ec1b616a..7e1570435f217e159a91b17032cc0a6b33bd1d5f 100644 (file)
@@ -671,12 +671,6 @@ static int ehci_run (struct usb_hcd *hcd)
        /* Modifying FIFO Burst Threshold value from 2 to 8 */
        temp = readl(non_ehci + 0x164);
        ehci_writel(ehci, 0x00080000, non_ehci + 0x164);
-#if defined(CONFIG_XILINX_ZED_USB_OTG)
-       if (ehci->ulpi) {
-               struct usb_phy *phy = ehci->ulpi;
-               otg_set_vbus(phy->otg, 1);
-       }
-#endif
 #endif
        /* GRR this is run-once init(), being done every time the HC starts.
         * So long as they're part of class devices, we can't do it init()
index b5a00904bd8ae312b40544f084cffd97ec06db22..af2e86b892875e5ca14b0ee67244ba63c90eb157 100644 (file)
@@ -23,9 +23,6 @@
 #include <linux/platform_device.h>
 #include <linux/xilinx_devices.h>
 #include <linux/usb/otg.h>
-#ifdef CONFIG_XILINX_ZED_USB_OTG
-#include <linux/usb/ulpi.h>
-#endif
 #include <linux/usb/xilinx_usbps_otg.h>
 
 #include "ehci-xilinx-usbps.h"
@@ -168,15 +165,6 @@ static int usb_hcd_xusbps_probe(const struct hc_driver *driver,
 #ifdef CONFIG_USB_XUSBPS_OTG
        ehci = hcd_to_ehci(hcd);
        if (pdata->otg) {
-#ifdef CONFIG_XILINX_ZED_USB_OTG
-               pr_info ("%s: Have OTG assigned.\n", __func__);
-
-               retval = usb_phy_init(pdata->otg);
-               if (retval) {
-                       dev_err(&pdev->dev, "Unable to init transceiver, probably missing\n");
-                       return ENODEV;
-               }
-#endif
                hcd->phy = pdata->otg;
                retval = otg_set_host(hcd->phy->otg,
                                &ehci_to_hcd(ehci)->self);
@@ -195,20 +183,16 @@ static int usb_hcd_xusbps_probe(const struct hc_driver *driver,
 
                usb_remove_hcd(hcd);
        } else {
-#ifdef CONFIG_XILINX_ZED_USB_OTG
-               pr_info ("%s: No OTG assigned!\n", __func__);
-               pdata->otg = otg_ulpi_create(&ulpi_viewport_access_ops,
-                       ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
-               if (pdata->otg) {
-                       pdata->otg->io_priv = hcd->regs + XUSBPS_SOC_USB_ULPIVP;
-                       ehci->ulpi = pdata->otg;
-               }
-               pr_info ("%s: OTG now assigned!\n", __func__);
-#endif
-
                retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
                if (retval != 0)
                        goto err2;
+
+               /*
+                * Enable vbus on ULPI - zedboard requirement
+                * to get host mode to work
+                */
+               if (pdata->ulpi)
+                       otg_set_vbus(pdata->ulpi->otg, 1);
        }
 #else
        /* Don't need to set host mode here. It will be done by tdi_reset() */
index 0a19e479d3c5de59e55fad9711aebad7d4352632..1c6fe46f7e5ceaf96b11810fa0007549d82a8323 100644 (file)
@@ -179,9 +179,6 @@ struct ehci_hcd {                   /* one per controller */
         * other external transceivers should be software-transparent
         */
        void (*start_hnp)(struct ehci_hcd *ehci);
-#ifdef CONFIG_XILINX_ZED_USB_OTG
-       struct otg_transceiver  *ulpi;
-#endif
 #endif
 
        /* per-HC memory pools (could be per-bus, but ...) */
index 95279b5234d0d2df2446f47f5c15744ac605227f..99a8e3c6f6d877aec21574d1e4203c17379fed51 100644 (file)
@@ -150,17 +150,4 @@ config USB_XUSBPS_OTG
          To compile this driver as a module, choose M here: the
          module will be called xilinx_usbps_otg.
 
-config XILINX_ZED_USB_OTG
-       bool "Using USB OTG on the Digilent ZED board"
-       default n
-       depends on USB_SUPPORT
-       select USB_XUSBPS_OTG
-       select USB_ULPI if USB_SUPPORT
-       select USB_ULPI_VIEWPORT if USB_SUPPORT
-       help
-         Select this option if using the USB OTG port on the Digilent ZED board
-         as a USB on-the-go port. This option is necessary to properly
-         initialize the TUSB1210 USB PHY used on the ZED board as an
-         on-the-go USB port that can supply power to a USB slave device.
-
 endif # USB || OTG