diff options
author | Stefan Weil <weil@mail.berlios.de> | 2009-09-01 22:16:10 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-09 14:57:21 -0500 |
commit | d6fd1e660312f96e6b5ca708b07a58df725ca055 (patch) | |
tree | 469fadac152c1b9e8efb2ccbe1fc00e413d92de9 /hw/eepro100.c | |
parent | c32d766af127f68bb75ba5689f2f5239227bf559 (diff) |
eepro100: Clean code which sets the PCI device id
* Use function pci_config_set_device_id
* Use new macro PCI_DEVICE_ID_INTEL_82557
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/eepro100.c')
-rw-r--r-- | hw/eepro100.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c index 68fec9c998..03711a953f 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -397,8 +397,7 @@ static void pci_reset(EEPRO100State * s) /* PCI Vendor ID */ pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); - /* PCI Device ID */ - pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82551IT); + /* PCI Device ID depends on device and is set below. */ /* PCI Command */ PCI_CONFIG_16(PCI_COMMAND, 0x0000); /* PCI Status */ @@ -446,29 +445,29 @@ static void pci_reset(EEPRO100State * s) switch (device) { case i82551: - //~ PCI_CONFIG_16(PCI_DEVICE_ID, 0x1209); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82551IT); PCI_CONFIG_8(PCI_REVISION_ID, 0x0f); break; case i82557B: - PCI_CONFIG_16(PCI_DEVICE_ID, 0x1229); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82557); PCI_CONFIG_8(PCI_REVISION_ID, 0x02); break; case i82557C: - PCI_CONFIG_16(PCI_DEVICE_ID, 0x1229); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82557); PCI_CONFIG_8(PCI_REVISION_ID, 0x03); break; case i82558B: - PCI_CONFIG_16(PCI_DEVICE_ID, 0x1229); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82557); PCI_CONFIG_16(PCI_STATUS, 0x2810); PCI_CONFIG_8(PCI_REVISION_ID, 0x05); break; case i82559C: - PCI_CONFIG_16(PCI_DEVICE_ID, 0x1229); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82557); PCI_CONFIG_16(PCI_STATUS, 0x2810); //~ PCI_CONFIG_8(PCI_REVISION_ID, 0x08); break; case i82559ER: - //~ PCI_CONFIG_16(PCI_DEVICE_ID, 0x1209); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82551IT); PCI_CONFIG_16(PCI_STATUS, 0x2810); PCI_CONFIG_8(PCI_REVISION_ID, 0x09); break; |