mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
isa: pic: convert to QEMU Object Model
This converts two devices at once because PIC subclasses ISA and converting subclasses independently is extremely hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e855761ca8
commit
8f04ee0882
28 changed files with 390 additions and 192 deletions
20
hw/ide/isa.c
20
hw/ide/isa.c
|
@ -94,13 +94,19 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
|
|||
return dev;
|
||||
}
|
||||
|
||||
static ISADeviceInfo isa_ide_info = {
|
||||
.qdev.name = "isa-ide",
|
||||
.qdev.fw_name = "ide",
|
||||
.qdev.size = sizeof(ISAIDEState),
|
||||
.init = isa_ide_initfn,
|
||||
.qdev.reset = isa_ide_reset,
|
||||
.qdev.props = (Property[]) {
|
||||
static void isa_ide_class_initfn(ObjectClass *klass, void *data)
|
||||
{
|
||||
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
||||
ic->init = isa_ide_initfn;
|
||||
}
|
||||
|
||||
static DeviceInfo isa_ide_info = {
|
||||
.name = "isa-ide",
|
||||
.fw_name = "ide",
|
||||
.size = sizeof(ISAIDEState),
|
||||
.class_init = isa_ide_class_initfn,
|
||||
.reset = isa_ide_reset,
|
||||
.props = (Property[]) {
|
||||
DEFINE_PROP_HEX32("iobase", ISAIDEState, iobase, 0x1f0),
|
||||
DEFINE_PROP_HEX32("iobase2", ISAIDEState, iobase2, 0x3f6),
|
||||
DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, 14),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue