diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-08-17 11:08:46 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-08-17 11:08:46 -0400 |
commit | cde7a58def4231f26d1dd53909067a143fa9eaab (patch) | |
tree | 286639d8d129c015fc953fbd13097cd7e7ca6e63 /src/pci.c | |
parent | 6cb8ba9cb3f8a71ac8e561f477dc2a51a2ecdb7a (diff) | |
download | seabios-cde7a58def4231f26d1dd53909067a143fa9eaab.tar.gz |
Return max bus number in int 1a/b101 call.
Add new option CONFIG_PCI_BUS_COUNT to set max bus count.
Use that option consistently in handle_1ab101() and pci.c.
Also, clean up comments of handle_1ab101().
Diffstat (limited to 'src/pci.c')
-rw-r--r-- | src/pci.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -8,8 +8,7 @@ #include "pci.h" // PCIDevice #include "ioport.h" // outl #include "util.h" // dprintf - -#define MAX_BUS 1 +#include "config.h" // CONFIG_* void pci_config_writel(PCIDevice d, u32 addr, u32 val) { @@ -58,7 +57,7 @@ pci_find_device(u16 vendid, u16 devid, int index, PCIDevice *dev) { int devfn, bus; u32 id = (devid << 16) | vendid; - for (bus=0; bus < MAX_BUS; bus++) { + for (bus=0; bus < CONFIG_PCI_BUS_COUNT; bus++) { for (devfn=0; devfn<0x100; devfn++) { PCIDevice d = pci_bd(bus, devfn); u32 v = pci_config_readl(d, 0x00); @@ -80,7 +79,7 @@ int pci_find_class(u32 classid, int index, PCIDevice *dev) { int devfn, bus; - for (bus=0; bus < MAX_BUS; bus++) { + for (bus=0; bus < CONFIG_PCI_BUS_COUNT; bus++) { for (devfn=0; devfn<0x100; devfn++) { PCIDevice d = pci_bd(bus, devfn); u32 v = pci_config_readl(d, 0x08); |