Push 'struct pci_device' into USB code (instead of using u16 bdf).
[seabios.git] / src / usb-uhci.c
index 40f83bb9a850d57b1662fd2d1ab6d6ba136e2fed..6e454742e5d81fdb02deb84184441f87cb737d09 100644 (file)
@@ -179,14 +179,15 @@ fail:
 }
 
 void
-uhci_init(u16 bdf, int busid)
+uhci_init(struct pci_device *pci, int busid)
 {
     if (! CONFIG_USB_UHCI)
         return;
+    u16 bdf = pci->bdf;
     struct usb_uhci_s *cntl = malloc_tmphigh(sizeof(*cntl));
     memset(cntl, 0, sizeof(*cntl));
     cntl->usb.busid = busid;
-    cntl->usb.bdf = bdf;
+    cntl->usb.pci = pci;
     cntl->usb.type = USB_TYPE_UHCI;
     cntl->iobase = (pci_config_readl(bdf, PCI_BASE_ADDRESS_4)
                     & PCI_BASE_ADDRESS_IO_MASK);