diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2011-07-09 14:31:50 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-07-10 15:36:04 -0400 |
commit | 1355a88fd3a1534e79ddbf244ecfae387afc5c63 (patch) | |
tree | 9ab710e43d3732e9781445c7f8a58b120446bd72 | |
parent | 8ff8e01ad3ef59a2b15028d03f450c4fa209aaf1 (diff) | |
download | seabios-1355a88fd3a1534e79ddbf244ecfae387afc5c63.zip seabios-1355a88fd3a1534e79ddbf244ecfae387afc5c63.tar.gz seabios-1355a88fd3a1534e79ddbf244ecfae387afc5c63.tar.bz2 |
Push use of 'struct pci_device' to bootprio_find_usb().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/boot.c | 4 | ||||
-rw-r--r-- | src/boot.h | 3 | ||||
-rw-r--r-- | src/usb-msc.c | 5 |
3 files changed, 6 insertions, 6 deletions
@@ -193,14 +193,14 @@ int bootprio_find_named_rom(const char *name, int instance) return find_prio(desc); } -int bootprio_find_usb(int bdf, u64 path) +int bootprio_find_usb(struct pci_device *pci, u64 path) { if (!CONFIG_BOOTORDER) return -1; // Find usb - for example: /pci@i0cf8/usb@1,2/hub@1/network@0/ethernet@0 int i; char desc[256], *p; - p = build_pci_path(desc, sizeof(desc), "usb", find_pci(bdf)); + p = build_pci_path(desc, sizeof(desc), "usb", pci); for (i=56; i>0; i-=8) { int port = (path >> i) & 0xff; if (port != 0xff) @@ -12,11 +12,12 @@ void boot_add_hd(struct drive_s *drive_g, const char *desc, int prio); void boot_add_cd(struct drive_s *drive_g, const char *desc, int prio); void boot_add_cbfs(void *data, const char *desc, int prio); void boot_prep(void); +struct pci_device; int bootprio_find_pci_device(int bdf); int bootprio_find_ata_device(int bdf, int chanid, int slave); int bootprio_find_fdc_device(int bdf, int port, int fdid); int bootprio_find_pci_rom(int bdf, int instance); int bootprio_find_named_rom(const char *name, int instance); -int bootprio_find_usb(int bdf, u64 path); +int bootprio_find_usb(struct pci_device *pci, u64 path); #endif // __BOOT_H diff --git a/src/usb-msc.c b/src/usb-msc.c index a57e4d2..13ef93e 100644 --- a/src/usb-msc.c +++ b/src/usb-msc.c @@ -12,7 +12,6 @@ #include "blockcmd.h" // cdb_read #include "disk.h" // DTYPE_USB #include "boot.h" // boot_add_hd -#include "pci.h" // struct pci_device struct usbdrive_s { struct drive_s drive; @@ -146,7 +145,7 @@ setup_drive_cdrom(struct disk_op_s *op, char *desc) op->drive_g->sectors = (u64)-1; struct usb_pipe *pipe = container_of( op->drive_g, struct usbdrive_s, drive)->bulkout; - int prio = bootprio_find_usb(pipe->cntl->pci->bdf, pipe->path); + int prio = bootprio_find_usb(pipe->cntl->pci, pipe->path); boot_add_cd(op->drive_g, desc, prio); return 0; } @@ -174,7 +173,7 @@ setup_drive_hd(struct disk_op_s *op, char *desc) // Register with bcv system. struct usb_pipe *pipe = container_of( op->drive_g, struct usbdrive_s, drive)->bulkout; - int prio = bootprio_find_usb(pipe->cntl->pci->bdf, pipe->path); + int prio = bootprio_find_usb(pipe->cntl->pci, pipe->path); boot_add_hd(op->drive_g, desc, prio); return 0; |