6eb43e961e94ce91a02994d7ed7e46d5cd362e79
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
1 From a9f1d7994a9f8a38fdace19454ef031244e24e5e Mon Sep 17 00:00:00 2001
2 From: Peter Chen <peter.chen@nxp.com>
3 Date: Thu, 9 Nov 2017 16:58:40 +0800
4 Subject: [PATCH] MLK-16735 usb: host: add XHCI_CDNS_HOST flag
5
6 The NXP Cadence XHCI host has the same issue with Intel's,
7 it is triggered by reboot test, the test case is described
8 at this jira ticket.
9
10 BuildInfo:
11 - SCFW 8dcff26, IMX-MKIMAGE ea027c4b, ATF
12 - U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g6dc7b0f
13
14 Acked-by: Jun Li <jun.li@nxp.com>
15 Signed-off-by: Peter Chen <peter.chen@nxp.com>
16 (cherry picked from commit 5e353132931b9dc6e05f6bea1281ae35dd6a59d8)
17 ---
18 drivers/usb/host/xhci.c | 2 +-
19 drivers/usb/host/xhci.h | 1 +
20 2 files changed, 2 insertions(+), 1 deletion(-)
21
22 --- a/drivers/usb/host/xhci.c
23 +++ b/drivers/usb/host/xhci.c
24 @@ -193,7 +193,7 @@ int xhci_reset(struct xhci_hcd *xhci)
25 * Without this delay, the subsequent HC register access,
26 * may result in a system hang very rarely.
27 */
28 - if (xhci->quirks & XHCI_INTEL_HOST)
29 + if (xhci->quirks & (XHCI_INTEL_HOST | XHCI_CDNS_HOST))
30 udelay(1000);
31
32 ret = xhci_handshake(&xhci->op_regs->command,
33 --- a/drivers/usb/host/xhci.h
34 +++ b/drivers/usb/host/xhci.h
35 @@ -1873,6 +1873,7 @@ struct xhci_hcd {
36 #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33)
37 #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
38 #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)
39 +#define XHCI_CDNS_HOST BIT_ULL(36)
40 #define XHCI_SKIP_PHY_INIT BIT_ULL(37)
41 #define XHCI_DISABLE_SPARSE BIT_ULL(38)
42