2020-04-10 02:47:05 +00:00
|
|
|
From b5c498026a95f9d80be23711dd6c178cc78d6c33 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Peter Chen <peter.chen@nxp.com>
|
|
|
|
Date: Wed, 15 Aug 2018 14:59:55 +0800
|
|
|
|
Subject: [PATCH] MLK-18794-1 usb: host: xhci: add .bus_suspend override
|
|
|
|
|
|
|
|
Some platforms (eg: Cadence USB3) have special requirements to add
|
|
|
|
platform USB register setting between xhci_bus_suspend and
|
|
|
|
platform USB controller suspend routine. Eg, The Cadence USB3 needs
|
|
|
|
RX detect clock switch from 24Mhz to 32Khz within 100ms after set
|
|
|
|
port to U3, but sometimes, for USB3 HUB connection, the USB2
|
|
|
|
bus suspend will cost more than 100ms, and introduce the disconnection
|
|
|
|
before the PHY enters low power mode, then the state is in mess from
|
|
|
|
controller side.
|
|
|
|
|
|
|
|
So in this commit, we introduce .bus_suspend for xhci_driver_overrides
|
|
|
|
for above use cases.
|
|
|
|
|
|
|
|
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
|
|
|
(cherry picked from commit f6baa57913ceb40da14a945820cb87e8d6ceb7c7)
|
|
|
|
---
|
|
|
|
drivers/usb/host/xhci.c | 2 ++
|
|
|
|
drivers/usb/host/xhci.h | 1 +
|
|
|
|
2 files changed, 3 insertions(+)
|
|
|
|
|
|
|
|
--- a/drivers/usb/host/xhci.c
|
|
|
|
+++ b/drivers/usb/host/xhci.c
|
kernel: bump 5.4 to 5.4.73
Removed upstreamed patches:
generic/pending-5.4
445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch
446-mtd-spinand-gigadevice-Add-QE-Bit.patch
pistachio/patches-5.4
150-pwm-img-Fix-null-pointer-access-in-probe.patch
Manually rebased:
layerscape/patches-5.4
801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch
801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch
801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch
820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch
All modifications made by update_kernel.sh
Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
mvebu (mamba, rango), x86_64, ramips/mt7621
Run-tested: ipq806x/R7800, mvebu (mamba, rango), x86_64, ramips (RT-AC57U)
No dmesg regressions, everything functional
Signed-off-by: John Audia <graysky@archlinux.us>
[alter 820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-31 11:35:12 +00:00
|
|
|
@@ -5378,6 +5378,8 @@ void xhci_init_driver(struct hc_driver *
|
2020-04-10 02:47:05 +00:00
|
|
|
drv->reset = over->reset;
|
|
|
|
if (over->start)
|
|
|
|
drv->start = over->start;
|
|
|
|
+ if (over->bus_suspend)
|
|
|
|
+ drv->bus_suspend = over->bus_suspend;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(xhci_init_driver);
|
|
|
|
--- a/drivers/usb/host/xhci.h
|
|
|
|
+++ b/drivers/usb/host/xhci.h
|
2020-05-11 11:17:22 +00:00
|
|
|
@@ -1911,6 +1911,7 @@ struct xhci_driver_overrides {
|
2020-04-10 02:47:05 +00:00
|
|
|
size_t extra_priv_size;
|
|
|
|
int (*reset)(struct usb_hcd *hcd);
|
|
|
|
int (*start)(struct usb_hcd *hcd);
|
|
|
|
+ int (*bus_suspend)(struct usb_hcd *hcd);
|
|
|
|
};
|
|
|
|
|
|
|
|
#define XHCI_CFC_DELAY 10
|