Exemple #1
0
static int ehci_zynq_otg_start_host(struct usb_phy *otg)
{
	struct usb_hcd		*hcd = bus_to_hcd(otg->otg->host);
	struct zynq_otg *xotg =
			xceiv_to_xotg(hcd->usb_phy);

	usb_add_hcd(hcd, xotg->irq, IRQF_SHARED);
	return 0;
}
Exemple #2
0
static int ehci_xusbps_otg_start_host(struct otg_transceiver  *otg)
{
	struct usb_hcd		*hcd = bus_to_hcd(otg->host);
	struct xusbps_otg *xotg =
			xceiv_to_xotg(hcd_to_ehci(hcd)->transceiver);

	usb_add_hcd(hcd, xotg->irq, IRQF_SHARED | IRQF_DISABLED);
	return 0;
}
Exemple #3
0
/* This connection event is useful when a OTG test device is connected.
   In that case, the device connect notify event will not be generated
   since the device will be suspended before complete enumeration.
*/
static int ehci_zynq_update_device(struct usb_hcd *hcd, struct usb_device
		*udev)
{
	struct zynq_otg *xotg = xceiv_to_xotg(hcd->usb_phy);

	if (udev->portnum == hcd->self.otg_port) {
		/* HNP test device */
		if ((le16_to_cpu(udev->descriptor.idVendor) == 0x1a0a &&
			le16_to_cpu(udev->descriptor.idProduct) == 0xbadd)) {
			if (xotg->otg.otg->default_a == 1)
				xotg->hsm.b_conn = 1;
			else
				xotg->hsm.a_conn = 1;
			zynq_update_transceiver();
		}
	}
	return 0;
}