]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
usb: xhci: Set XHCI Light Reset for DWC3_OTG mode
authorManish Narani <manish.narani@xilinx.com>
Thu, 23 Mar 2017 10:26:13 +0000 (15:56 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 24 Mar 2017 08:02:00 +0000 (09:02 +0100)
This Patch corrects the XHCI reset for OTG mode. The host cannot
have Hard Reset while in OTG mode because that will affect the
OTG peripheral mode event buffers and it will not function.

The macro for OTG is USB_DWC3_OTG not USB_DWC3_DUAL_ROLE. This patch
corrects the same.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/host/xhci.c

index 3325c7dff02ca8b596ef216b0516d19f63daa51a..5d9970b2bc71097eaab5fcc672cf0bdc507df95c 100644 (file)
@@ -174,7 +174,7 @@ int xhci_reset(struct xhci_hcd *xhci)
 
        xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Reset the HC");
        command = readl(&xhci->op_regs->command);
-#ifdef CONFIG_USB_DWC3_DUAL_ROLE
+#ifdef CONFIG_USB_DWC3_OTG
        command |= CMD_LRESET;
 #else
        command |= CMD_RESET;
@@ -192,7 +192,7 @@ int xhci_reset(struct xhci_hcd *xhci)
                udelay(1000);
 
        ret = xhci_handshake(&xhci->op_regs->command,
-#ifdef CONFIG_USB_DWC3_DUAL_ROLE
+#ifdef CONFIG_USB_DWC3_OTG
                        CMD_LRESET,
 #else
                        CMD_RESET,