[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v9 23/30] isa-fdc: remove bootindexA/B property from
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v9 23/30] isa-fdc: remove bootindexA/B property from qdev to qom |
Date: |
Wed, 10 Sep 2014 20:31:19 +0800 |
From: Gonglei <address@hidden>
Remove bootindexA/B form qdev property to qom, things will
continue to work just fine, and we can use qom features
which are not supported by qdev property.
Signed-off-by: Gonglei <address@hidden>
---
hw/block/fdc.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 490d127..cb31cf7 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -2217,8 +2217,6 @@ static Property isa_fdc_properties[] = {
DEFINE_PROP_UINT32("dma", FDCtrlISABus, dma, 2),
DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.drives[0].bs),
DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.drives[1].bs),
- DEFINE_PROP_INT32("bootindexA", FDCtrlISABus, bootindexA, -1),
- DEFINE_PROP_INT32("bootindexB", FDCtrlISABus, bootindexB, -1),
DEFINE_PROP_BIT("check_media_rate", FDCtrlISABus, state.check_media_rate,
0, true),
DEFINE_PROP_END_OF_LIST(),
@@ -2236,11 +2234,24 @@ static void isabus_fdc_class_init(ObjectClass *klass,
void *data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
+static void isabus_fdc_instance_init(Object *obj)
+{
+ FDCtrlISABus *isa = ISA_FDC(obj);
+
+ device_add_bootindex_property(obj, &isa->bootindexA,
+ "bootindexA", "/address@hidden",
+ DEVICE(obj), NULL);
+ device_add_bootindex_property(obj, &isa->bootindexB,
+ "bootindexB", "/address@hidden",
+ DEVICE(obj), NULL);
+}
+
static const TypeInfo isa_fdc_info = {
.name = TYPE_ISA_FDC,
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(FDCtrlISABus),
.class_init = isabus_fdc_class_init,
+ .instance_init = isabus_fdc_instance_init,
};
static const VMStateDescription vmstate_sysbus_fdc ={
--
1.7.12.4
- [Qemu-devel] [PATCH v9 15/30] vmxnet3: add bootindex to qom property, (continued)
- [Qemu-devel] [PATCH v9 15/30] vmxnet3: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 09/30] e1000: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 18/30] virtio-net: alias bootindex property explicitly for virt-net-pci/ccw/s390, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 17/30] net: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 16/30] usb-net: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 20/30] pci-assign: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 19/30] host-libusb: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 21/30] vfio: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 11/30] ne2000: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 24/30] scsi: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 23/30] isa-fdc: remove bootindexA/B property from qdev to qom,
arei.gonglei <=
- [Qemu-devel] [PATCH v9 22/30] redirect: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 25/30] ide: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 28/30] ide: add calling add_boot_device_patch in bootindex setter function, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 30/30] bootindex: delete bootindex when device is removed, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 27/30] block: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 26/30] virtio-blk: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v9 29/30] bootindex: move calling add_boot_device_patch to bootindex setter function, arei.gonglei, 2014/09/10