start rewrite of pci_find_classcode

was scanning PCI config space of all valid slot/bus combination when all needed information is already available from the initial scan.
This commit is contained in:
Markus Fröschle
2016-12-05 07:03:16 +00:00
parent 1411589816
commit 21401b69a3
8 changed files with 52 additions and 81 deletions

View File

@@ -53,7 +53,7 @@
#include "usb.h"
#include "video.h"
// // #define DEBUG
#define DEBUG
#include "debug.h"
#define UNUSED(x) (void)(x) /* Unused variable */
@@ -588,11 +588,11 @@ void init_usb(void)
int usb_found = 0;
int index = 0;
xprintf("USB controller initialization:\r\n");
inf("USB controller initialization:\r\n");
do
{
handle = pci_find_classcode(PCI_CLASS_SERIAL_USB | PCI_FIND_BASE_CLASS | PCI_FIND_SUB_CLASS, index++);
handle = pci_find_classcode(PCI_CLASS_SERIAL_USB | PCI_FIND_BASE_CLASS | PCI_FIND_SUB_CLASS | PCI_FIND_PROG_IF, index++);
dbg("handle 0x%02x\r\n", handle);
if (handle > 0)
{