The AMD CS5536's USB controllers are located at device 0F, functions 4
authorJens Rottmann <JRottmann@LiPPERTEmbedded.de>
Fri, 3 Sep 2010 14:54:50 +0000 (14:54 +0000)
committerPatrick Georgi <patrick.georgi@coresystems.de>
Fri, 3 Sep 2010 14:54:50 +0000 (14:54 +0000)
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.

(changed to continue to use 32bit accesses -pg)

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5774 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

payloads/libpayload/drivers/usb/usbinit.c

index 9c8063a3cb17fcf4dda5c5a07f571765481920ea..50dbf9747090e3fb7c42680af4444915f5d9f2ee 100644 (file)
@@ -126,7 +126,7 @@ usb_initialize (void)
         */
        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_config32 (PCI_DEV(bus, dev, 0), 8) >> 16 != 0xffff)
                                for (func = 7; func >= 0 ; func--)
                                        usb_controller_initialize (bus, dev, func);
        usb_poll();