Skip to content

Commit

Permalink
MLK-18794-1 usb: host: xhci: add .bus_suspend override
Browse files Browse the repository at this point in the history
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 f6baa57)
  • Loading branch information
Peter Chen authored and Dong Aisheng committed Nov 25, 2019
1 parent 1e64a7d commit 5f0ebd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -5372,6 +5372,8 @@ void xhci_init_driver(struct hc_driver *drv,
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);
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/host/xhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,7 @@ struct xhci_driver_overrides {
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
Expand Down

0 comments on commit 5f0ebd9

Please sign in to comment.