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
33
hw/nand.c
33
hw/nand.c
|
@ -417,18 +417,27 @@ static int nand_device_init(SysBusDevice *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static SysBusDeviceInfo nand_info = {
|
||||
.init = nand_device_init,
|
||||
.qdev.name = "nand",
|
||||
.qdev.size = sizeof(NANDFlashState),
|
||||
.qdev.reset = nand_reset,
|
||||
.qdev.vmsd = &vmstate_nand,
|
||||
.qdev.props = (Property[]) {
|
||||
DEFINE_PROP_UINT8("manufacturer_id", NANDFlashState, manf_id, 0),
|
||||
DEFINE_PROP_UINT8("chip_id", NANDFlashState, chip_id, 0),
|
||||
DEFINE_PROP_DRIVE("drive", NANDFlashState, bdrv),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
}
|
||||
static Property nand_properties[] = {
|
||||
DEFINE_PROP_UINT8("manufacturer_id", NANDFlashState, manf_id, 0),
|
||||
DEFINE_PROP_UINT8("chip_id", NANDFlashState, chip_id, 0),
|
||||
DEFINE_PROP_DRIVE("drive", NANDFlashState, bdrv),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void nand_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
||||
|
||||
k->init = nand_device_init;
|
||||
}
|
||||
|
||||
static DeviceInfo nand_info = {
|
||||
.name = "nand",
|
||||
.size = sizeof(NANDFlashState),
|
||||
.reset = nand_reset,
|
||||
.vmsd = &vmstate_nand,
|
||||
.props = nand_properties,
|
||||
.class_init = nand_class_init,
|
||||
};
|
||||
|
||||
static void nand_create_device(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue