[coreboot] [PATCH] libpayload: scan all PCI functions for USB
Jens Rottmann
JRottmann at LiPPERTEmbedded.de
Fri Sep 3 16:44:40 CEST 2010
The AMD CS5536's USB controllers are located at device 0F, functions 4
and 5. They're not found if only function 0 is checked. So if a device
exists at all, try all its functions. usb_controller_initialize() will
silently skip all device classes != 0C03.
Signed-off-by: Jens Rottmann <JRottmann at LiPPERTEmbedded.de>
---
--- payloads/libpayload/drivers/usb/usbinit.c (rev 5767)
+++ payloads/libpayload/drivers/usb/usbinit.c (working copy)
@@ -126,7 +126,7 @@
*/
for (bus = 0; bus < 256; bus++)
for (dev = 0; dev < 32; dev++)
- if (pci_read_config32 (PCI_DEV(bus, dev, 0), 8) >> 16 == 0x0c03)
+ if (pci_read_config16(PCI_DEV(bus, dev, 0), 10) != 0xFFFF)
for (func = 7; func >= 0 ; func--)
usb_controller_initialize (bus, dev, func);
usb_poll();
_
More information about the coreboot
mailing list