pci: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2011-12-04 12:22:06 -06:00
parent 6e4ec3f9bb
commit 40021f0888
53 changed files with 1591 additions and 1042 deletions

View file

@ -1197,23 +1197,32 @@ static void qdev_e1000_reset(DeviceState *dev)
e1000_reset(d);
}
static PCIDeviceInfo e1000_info = {
.qdev.name = "e1000",
.qdev.desc = "Intel Gigabit Ethernet",
.qdev.size = sizeof(E1000State),
.qdev.reset = qdev_e1000_reset,
.qdev.vmsd = &vmstate_e1000,
.init = pci_e1000_init,
.exit = pci_e1000_uninit,
.romfile = "pxe-e1000.rom",
.vendor_id = PCI_VENDOR_ID_INTEL,
.device_id = E1000_DEVID,
.revision = 0x03,
.class_id = PCI_CLASS_NETWORK_ETHERNET,
.qdev.props = (Property[]) {
DEFINE_NIC_PROPERTIES(E1000State, conf),
DEFINE_PROP_END_OF_LIST(),
}
static Property e1000_properties[] = {
DEFINE_NIC_PROPERTIES(E1000State, conf),
DEFINE_PROP_END_OF_LIST(),
};
static void e1000_class_init(ObjectClass *klass, void *data)
{
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->init = pci_e1000_init;
k->exit = pci_e1000_uninit;
k->romfile = "pxe-e1000.rom";
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = E1000_DEVID;
k->revision = 0x03;
k->class_id = PCI_CLASS_NETWORK_ETHERNET;
}
static DeviceInfo e1000_info = {
.name = "e1000",
.desc = "Intel Gigabit Ethernet",
.size = sizeof(E1000State),
.reset = qdev_e1000_reset,
.vmsd = &vmstate_e1000,
.props = e1000_properties,
.class_init = e1000_class_init,
};
static void e1000_register_devices(void)