aboutsummaryrefslogtreecommitdiff
path: root/src/optionroms.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2011-06-21 22:52:51 -0400
committerKevin O'Connor <kevin@koconnor.net>2011-06-21 22:52:51 -0400
commit76b5e7146bac15ad5357ca9e46bd8f6fd7ace3c2 (patch)
tree000e299034fd019807e1cb561fc2307658452119 /src/optionroms.c
parent278b19f49bc5f62380322f5d2f375a9fceb42a1b (diff)
downloadseabios-hppa-76b5e7146bac15ad5357ca9e46bd8f6fd7ace3c2.zip
seabios-hppa-76b5e7146bac15ad5357ca9e46bd8f6fd7ace3c2.tar.gz
seabios-hppa-76b5e7146bac15ad5357ca9e46bd8f6fd7ace3c2.tar.bz2
Use 'struct pci_device' to note which devices have native drivers.
Remove the check in optionroms.c for CONFIG_ATA and PCI_CLASS_STORAGE_IDE with a flag in 'struct pci_device'. This ensures devices using the ATA driver that aren't in PCI_CLASS_STORAGE_IDE don't have their optionroms executed. It also allows other drivers to disable option rom execution in the future.
Diffstat (limited to 'src/optionroms.c')
-rw-r--r--src/optionroms.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/optionroms.c b/src/optionroms.c
index b2415cc..27c172f 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -410,9 +410,7 @@ optionrom_setup(void)
// Find and deploy PCI roms.
struct pci_device *pci;
foreachpci(pci) {
- u16 v = pci->class;
- if (v == 0x0000 || v == 0xffff || v == PCI_CLASS_DISPLAY_VGA
- || (CONFIG_ATA && v == PCI_CLASS_STORAGE_IDE))
+ if (pci->class == PCI_CLASS_DISPLAY_VGA || pci->have_driver)
continue;
init_pcirom(pci, 0, sources);
}