mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
40021f0888
commit
999e12bbe8
131 changed files with 2734 additions and 1297 deletions
18
hw/sh_pci.c
18
hw/sh_pci.c
|
@ -110,7 +110,7 @@ static void sh_pci_set_irq(void *opaque, int irq_num, int level)
|
|||
qemu_set_irq(pic[irq_num], level);
|
||||
}
|
||||
|
||||
static int sh_pci_init_device(SysBusDevice *dev)
|
||||
static int sh_pci_device_init(SysBusDevice *dev)
|
||||
{
|
||||
SHPCIState *s;
|
||||
int i;
|
||||
|
@ -162,10 +162,22 @@ static DeviceInfo sh_pci_host_info = {
|
|||
.class_init = sh_pci_host_class_init,
|
||||
};
|
||||
|
||||
static void sh_pci_device_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
|
||||
|
||||
sdc->init = sh_pci_device_init;
|
||||
}
|
||||
|
||||
static DeviceInfo sh_pci_device_info = {
|
||||
.name = "sh_pci",
|
||||
.size = sizeof(SHPCIState),
|
||||
.class_init = sh_pci_device_class_init,
|
||||
};
|
||||
|
||||
static void sh_pci_register_devices(void)
|
||||
{
|
||||
sysbus_register_dev("sh_pci", sizeof(SHPCIState),
|
||||
sh_pci_init_device);
|
||||
sysbus_qdev_register(&sh_pci_device_info);
|
||||
pci_qdev_register(&sh_pci_host_info);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue