Restructured PCI subsystem to fit the new device model.

Generic PCI code now handles 64-bit BARs correctly when setting
"membase"; drivers should need to call pci_bar_start() only if they want
to use BARs other than the first memory or I/O BAR.

Split rarely-used PCI functions out into pciextra.c.

Core PCI code is now 662 bytes (down from 1308 bytes in Etherboot 5.4).
284 bytes of this saving comes from the pci/pciextra split.

Cosmetic changes to lots of drivers (e.g. vendor_id->vendor in order to
match the names used in Linux).
This commit is contained in:
Michael Brown
2006-05-16 15:12:06 +00:00
parent fcdab6299c
commit 15ee09ed10
35 changed files with 552 additions and 542 deletions

View File

@@ -609,7 +609,7 @@ static struct nic_operations w89c840_operations = {
};
static struct pci_id w89c840_nics[] = {
static struct pci_device_id w89c840_nics[] = {
PCI_ROM(0x1050, 0x0840, "winbond840", "Winbond W89C840F"),
PCI_ROM(0x11f6, 0x2011, "compexrl100atx", "Compex RL100ATX"),
};
@@ -643,20 +643,20 @@ static int w89c840_probe ( struct nic *nic, struct pci_device *p ) {
#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011
/* From Matt Hortman <mbhortman@acpthinclient.com> */
if (p->vendor_id == PCI_VENDOR_ID_WINBOND2
&& p->device_id == PCI_DEVICE_ID_WINBOND2_89C840) {
if (p->vendor == PCI_VENDOR_ID_WINBOND2
&& p->device == PCI_DEVICE_ID_WINBOND2_89C840) {
/* detected "Winbond W89c840 Fast Ethernet PCI NIC" */
} else if ( p->vendor_id == PCI_VENDOR_ID_COMPEX
&& p->device_id == PCI_DEVICE_ID_COMPEX_RL100ATX) {
} else if ( p->vendor == PCI_VENDOR_ID_COMPEX
&& p->device == PCI_DEVICE_ID_COMPEX_RL100ATX) {
/* detected "Compex RL100ATX Fast Ethernet PCI NIC" */
} else {
/* Gee, guess what? They missed again. */
printf("device ID : %X - is not a Compex RL100ATX NIC.\n",
p->device_id);
p->device);
return 0;
}