aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2009-09-19 13:02:09 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-10-04 14:59:33 +0200
commitc4c270e22762da810e4241d53db2941c8a289e5d (patch)
tree8db3ee7ee167ea96a3c6c89778695ff83ce4e7f2 /hw
parent3031efabd0bb744126a53f32c5426580b5d394d5 (diff)
eepro100: Add more i825xx devices
The new devices added here are still not functional - partially because some patches are still missing, partially because I cannot test them. Nevertheless they belong to the same family and will be supported by this driver some day. As soon as they work, they will also be added to hw/pci.c. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw')
-rw-r--r--hw/eepro100.c102
1 files changed, 94 insertions, 8 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 40c4b33a0e..a8f6b3f5bb 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -78,10 +78,15 @@
#define MAX_ETH_FRAME_SIZE 1514
/* This driver supports several different devices which are declared here. */
+#define i82550 0x82550
#define i82551 0x82551
+#define i82557A 0x82557a
#define i82557B 0x82557b
#define i82557C 0x82557c
+#define i82558A 0x82558a
#define i82558B 0x82558b
+#define i82559A 0x82559a
+#define i82559B 0x82559b
#define i82559C 0x82559c
#define i82559ER 0x82559e
#define i82562 0x82562
@@ -1711,9 +1716,9 @@ static void nic_cleanup(VLANClientState *vc)
eeprom93xx_free(s->eeprom);
}
-static int pci_nic_uninit(PCIDevice *dev)
+static int pci_nic_uninit(PCIDevice *pci_dev)
{
- EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, dev);
+ EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev);
cpu_unregister_io_memory(s->mmio_index);
@@ -1768,35 +1773,116 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device)
return 0;
}
-static int pci_i82551_init(PCIDevice *dev)
+static int pci_i82550_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82550);
+}
+
+static int pci_i82551_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82551);
+}
+
+static int pci_i82557a_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82557A);
+}
+
+static int pci_i82557b_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82557B);
+}
+
+static int pci_i82557c_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82557C);
+}
+
+static int pci_i82558a_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82558A);
+}
+
+static int pci_i82558b_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82558B);
+}
+
+static int pci_i82559a_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82559A);
+}
+
+static int pci_i82559b_init(PCIDevice *pci_dev)
+{
+ return nic_init(pci_dev, i82559B);
+}
+
+static int pci_i82559c_init(PCIDevice *pci_dev)
{
- return nic_init(dev, i82551);
+ return nic_init(pci_dev, i82559C);
}
-static int pci_i82557b_init(PCIDevice *dev)
+static int pci_i82559er_init(PCIDevice *pci_dev)
{
- return nic_init(dev, i82557B);
+ return nic_init(pci_dev, i82559ER);
}
-static int pci_i82559er_init(PCIDevice *dev)
+static int pci_i82562_init(PCIDevice *pci_dev)
{
- return nic_init(dev, i82559ER);
+ return nic_init(pci_dev, i82562);
}
static PCIDeviceInfo eepro100_info[] = {
{
+ .qdev.name = "i82550",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82550_init,
+ },{
.qdev.name = "i82551",
.qdev.size = sizeof(EEPRO100State),
.init = pci_i82551_init,
},{
+ .qdev.name = "i82557a",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82557a_init,
+ },{
.qdev.name = "i82557b",
.qdev.size = sizeof(EEPRO100State),
.init = pci_i82557b_init,
},{
+ .qdev.name = "i82557c",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82557c_init,
+ },{
+ .qdev.name = "i82558a",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82558a_init,
+ },{
+ .qdev.name = "i82558b",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82558b_init,
+ },{
+ .qdev.name = "i82559a",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82559a_init,
+ },{
+ .qdev.name = "i82559b",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82559b_init,
+ },{
+ .qdev.name = "i82559c",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82559c_init,
+ },{
.qdev.name = "i82559er",
.qdev.size = sizeof(EEPRO100State),
.init = pci_i82559er_init,
},{
+ .qdev.name = "i82562",
+ .qdev.size = sizeof(EEPRO100State),
+ .init = pci_i82562_init,
+ },{
/* end of list */
}
};