From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] eepro100: Add more i825xx devices
Date: Sat, 19 Sep 2009 13:02:09 +0200 [thread overview]
Message-ID: <1253358129-10347-1-git-send-email-weil@mail.berlios.de> (raw)
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.
This patch is a step to synchronize my maintainer version
of eepro100.c (git://repo.or.cz/qemu/ar7.git) with the
version integrated in QEMU.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
hw/eepro100.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 94 insertions(+), 8 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 3f84e26..1d66edb 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
@@ -1758,9 +1763,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);
@@ -1814,35 +1819,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 */
}
};
--
1.5.6.5
next reply other threads:[~2009-09-19 11:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-19 11:02 Stefan Weil [this message]
2009-10-05 13:22 ` [Qemu-devel] [PATCH] eepro100: Add more i825xx devices Anthony Liguori
2009-10-05 18:05 ` Stefan Weil
2009-10-05 18:54 ` Anthony Liguori
2009-10-06 16:29 ` Stefan Weil
2009-10-06 19:03 ` Anthony Liguori
2009-10-06 20:53 ` Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1253358129-10347-1-git-send-email-weil@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).