/* 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()
#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"
#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);
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() */
* 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 ...) */
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