MLK-16735 usb: host: add XHCI_CDNS_HOST flag
authorPeter Chen <peter.chen@nxp.com>
Thu, 9 Nov 2017 08:58:40 +0000 (16:58 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:39:16 +0000 (15:39 -0500)
The NXP Cadence XHCI host has the same issue with Intel's,
it is triggered by reboot test, the test case is described
at this jira ticket.

BuildInfo:
- SCFW 8dcff26, IMX-MKIMAGE ea027c4b, ATF
- U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g6dc7b0f

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/cdns3/host.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h

index 64bc9cc..22f6b19 100644 (file)
@@ -34,7 +34,7 @@ static void xhci_cdns3_quirks(struct device *dev, struct xhci_hcd *xhci)
         * here that the generic code does not try to make a pci_dev from our
         * dev struct in order to setup MSI
         */
-       xhci->quirks |= XHCI_PLAT;
+       xhci->quirks |= (XHCI_PLAT | XHCI_CDNS_HOST);
 }
 
 static int xhci_cdns3_setup(struct usb_hcd *hcd)
index b4533f2..10d314f 100644 (file)
@@ -184,7 +184,7 @@ int xhci_reset(struct xhci_hcd *xhci)
         * Without this delay, the subsequent HC register access,
         * may result in a system hang very rarely.
         */
-       if (xhci->quirks & XHCI_INTEL_HOST)
+       if (xhci->quirks & (XHCI_INTEL_HOST | XHCI_CDNS_HOST))
                udelay(1000);
 
        ret = xhci_handshake(&xhci->op_regs->command,
index 2fe3b9a..9f829aa 100644 (file)
@@ -1663,6 +1663,7 @@ struct xhci_hcd {
 /* Reserved. It was XHCI_U2_DISABLE_WAKE */
 #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL        (1 << 28)
 #define XHCI_SKIP_ACCESS_RESERVED_REG  (1 << 29)
+#define XHCI_CDNS_HOST                 (1 << 30)
 
        unsigned int            num_active_eps;
        unsigned int            limit_active_eps;