summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1abfd91)
raw | patch | inline | side by side (parent: 1abfd91)
author | George Cherian <george.cherian@ti.com> | |
Mon, 15 Dec 2014 18:37:45 +0000 (00:07 +0530) | ||
committer | Sekhar Nori <nsekhar@ti.com> | |
Tue, 16 Dec 2014 09:15:04 +0000 (14:45 +0530) |
This adds XHCI_NEEDS_LHC_RESET quirk, to make sure only Light Host Reset
is done during xhci_reset(). This is mainly useful when we switch roles
HOST to Device mode and viceversa.
The DWC3 IP shares internal RAM for both HOST and Device specific registers.
So while switching roles between HOST and Device modes, it's advbised to do
a LIGHT HC reset else the already configured global registers of the DWC3 IP
gets re-initialized.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
is done during xhci_reset(). This is mainly useful when we switch roles
HOST to Device mode and viceversa.
The DWC3 IP shares internal RAM for both HOST and Device specific registers.
So while switching roles between HOST and Device modes, it's advbised to do
a LIGHT HC reset else the already configured global registers of the DWC3 IP
gets re-initialized.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/usb/host/xhci.c | patch | blob | history | |
drivers/usb/host/xhci.h | patch | blob | history |
index f9ce8ac530b5eeeb90cb48dc6287603e33838370..0652305781479e0b51c617d78504f114805856ea 100644 (file)
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Reset the HC");
command = readl(&xhci->op_regs->command);
- command |= CMD_RESET;
+ command |= (xhci->quirks & XHCI_NEEDS_LHC_RESET) ? CMD_LRESET : CMD_RESET;
writel(command, &xhci->op_regs->command);
ret = xhci_handshake(xhci, &xhci->op_regs->command,
- CMD_RESET, 0, 10 * 1000 * 1000);
+ (xhci->quirks & XHCI_NEEDS_LHC_RESET) ? CMD_LRESET : CMD_RESET,
+ 0, 10 * 1000 * 1000);
if (ret)
return ret;
index e56b2229514c7a9f1a10fd382447e45c161726d5..23bba281aa1f95b1de13ee96ab0007a98f913fa6 100644 (file)
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
/* For controllers with a broken beyond repair streams implementation */
#define XHCI_BROKEN_STREAMS (1 << 19)
#define XHCI_DRD_SUPPORT (1 << 20)
+#define XHCI_NEEDS_LHC_RESET (1 << 21)
unsigned int num_active_eps;
unsigned int limit_active_eps;
/* There are two roothubs to keep track of bus suspend info for */