diff options
author | Nicolas Saenz Julienne <nsaenzjulienne@suse.de> | 2020-06-29 18:37:25 +0200 |
---|---|---|
committer | Matthias Brugger <mbrugger@suse.com> | 2020-07-10 11:49:28 +0200 |
commit | 0b80371b350e6732a02d5e39bf900413ae1271ba (patch) | |
tree | c6b01968e0d4c12b8614590cd3616cf97e29af93 /drivers/usb/host/xhci-mem.c | |
parent | 6836d59094727423086dbc27fd7732f514495af4 (diff) |
usb: xhci: Add reset controller support
Some atypical users of xhci might need to manually reset their xHCI
controller before starting the HCD setup. Check if a reset controller
device is available to the PCI bus and trigger a reset.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
[mb: squash fix to only build xhci_reset_hw() if CONFIG_DM_BUS]
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index f446520528..108f4bd8cf 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -180,6 +180,8 @@ void xhci_cleanup(struct xhci_ctrl *ctrl) xhci_free_virt_devices(ctrl); free(ctrl->erst.entries); free(ctrl->dcbaa); + if (reset_valid(&ctrl->reset)) + reset_free(&ctrl->reset); memset(ctrl, '\0', sizeof(struct xhci_ctrl)); } |