aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb/xhci.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2020-03-18 12:19:14 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-05-01 06:11:42 +0000
commit7724f1142ee5c71c3df6c3a45af6d9da3f0798b5 (patch)
treea4e3731573b8d90ab4bf6a91c352b3406af79f90 /payloads/libpayload/drivers/usb/xhci.c
parent2d7173d462c66cbbca6a5354c1ac719941e117d9 (diff)
lp/drivers/usb: Add quirk for QEMU XHCI root hub
The QEMU XHCI driver does not implement the Port Change Detect bit in the USBSTS register. As a result no devices are attached without looking at each port individually. Detect this as a quirk based on the QEMU XHCI controller PCI ID, and apply it to the root hub quirk list so it can get used by the generic hub driver to skip this check. With this change an attached USB mass storage device is detected and able to boot when supplied to qemu: -drive if=none,id=usbmsc,format=raw,file=/tmp/disk.img -device qemu-xhci,id-xhci -device usb-storage,bus=xhci.0,drive=usbmsc Change-Id: I6689cb1dbb24c93d45f5c5ef040b713925d07588 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39839 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb/xhci.c')
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index ef1d73ff68..21af579f4c 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -314,9 +314,13 @@ xhci_pci_init (pcidev_t addr)
controller = xhci_init((unsigned long)reg_addr);
if (controller) {
+ xhci_t *xhci = controller->instance;
controller->pcidev = addr;
xhci_switch_ppt_ports(addr);
+
+ /* Set up any quirks for controller root hub */
+ xhci->roothub->quirks = pci_quirk_check(addr);
}
return controller;