mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qdev: Remove hex8/32/64 property types
Replace them with uint8/32/64. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
committed by
Andreas Färber
parent
515f23462b
commit
c7bcc85d66
+1
-1
@@ -354,7 +354,7 @@ static void adlib_realizefn (DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
static Property adlib_properties[] = {
|
||||
DEFINE_PROP_HEX32 ("iobase", AdlibState, port, 0x220),
|
||||
DEFINE_PROP_UINT32 ("iobase", AdlibState, port, 0x220),
|
||||
DEFINE_PROP_UINT32 ("freq", AdlibState, freq, 44100),
|
||||
DEFINE_PROP_END_OF_LIST (),
|
||||
};
|
||||
|
||||
+1
-1
@@ -673,7 +673,7 @@ static int cs4231a_init (ISABus *bus)
|
||||
}
|
||||
|
||||
static Property cs4231a_properties[] = {
|
||||
DEFINE_PROP_HEX32 ("iobase", CSState, port, 0x534),
|
||||
DEFINE_PROP_UINT32 ("iobase", CSState, port, 0x534),
|
||||
DEFINE_PROP_UINT32 ("irq", CSState, irq, 9),
|
||||
DEFINE_PROP_UINT32 ("dma", CSState, dma, 3),
|
||||
DEFINE_PROP_END_OF_LIST (),
|
||||
|
||||
+1
-1
@@ -304,7 +304,7 @@ static int GUS_init (ISABus *bus)
|
||||
|
||||
static Property gus_properties[] = {
|
||||
DEFINE_PROP_UINT32 ("freq", GUSState, freq, 44100),
|
||||
DEFINE_PROP_HEX32 ("iobase", GUSState, port, 0x240),
|
||||
DEFINE_PROP_UINT32 ("iobase", GUSState, port, 0x240),
|
||||
DEFINE_PROP_UINT32 ("irq", GUSState, emu.gusirq, 7),
|
||||
DEFINE_PROP_UINT32 ("dma", GUSState, emu.gusdma, 3),
|
||||
DEFINE_PROP_END_OF_LIST (),
|
||||
|
||||
+1
-1
@@ -181,7 +181,7 @@ static void pcspk_realizefn(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
static Property pcspk_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", PCSpkState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("iobase", PCSpkState, iobase, -1),
|
||||
DEFINE_PROP_PTR("pit", PCSpkState, pit),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
+2
-2
@@ -1399,8 +1399,8 @@ static int SB16_init (ISABus *bus)
|
||||
}
|
||||
|
||||
static Property sb16_properties[] = {
|
||||
DEFINE_PROP_HEX32 ("version", SB16State, ver, 0x0405), /* 4.5 */
|
||||
DEFINE_PROP_HEX32 ("iobase", SB16State, port, 0x220),
|
||||
DEFINE_PROP_UINT32 ("version", SB16State, ver, 0x0405), /* 4.5 */
|
||||
DEFINE_PROP_UINT32 ("iobase", SB16State, port, 0x220),
|
||||
DEFINE_PROP_UINT32 ("irq", SB16State, irq, 5),
|
||||
DEFINE_PROP_UINT32 ("dma", SB16State, dma, 1),
|
||||
DEFINE_PROP_UINT32 ("dma16", SB16State, hdma, 5),
|
||||
|
||||
+1
-1
@@ -2216,7 +2216,7 @@ static const VMStateDescription vmstate_isa_fdc ={
|
||||
};
|
||||
|
||||
static Property isa_fdc_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", FDCtrlISABus, iobase, 0x3f0),
|
||||
DEFINE_PROP_UINT32("iobase", FDCtrlISABus, iobase, 0x3f0),
|
||||
DEFINE_PROP_UINT32("irq", FDCtrlISABus, irq, 6),
|
||||
DEFINE_PROP_UINT32("dma", FDCtrlISABus, dma, 2),
|
||||
DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.drives[0].bs),
|
||||
|
||||
+2
-2
@@ -110,9 +110,9 @@ static void debugcon_isa_realizefn(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
static Property debugcon_isa_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", ISADebugconState, iobase, 0xe9),
|
||||
DEFINE_PROP_UINT32("iobase", ISADebugconState, iobase, 0xe9),
|
||||
DEFINE_PROP_CHR("chardev", ISADebugconState, state.chr),
|
||||
DEFINE_PROP_HEX32("readback", ISADebugconState, state.readback, 0xe9),
|
||||
DEFINE_PROP_UINT32("readback", ISADebugconState, state.readback, 0xe9),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -595,7 +595,7 @@ bool parallel_mm_init(MemoryRegion *address_space,
|
||||
|
||||
static Property parallel_isa_properties[] = {
|
||||
DEFINE_PROP_UINT32("index", ISAParallelState, index, -1),
|
||||
DEFINE_PROP_HEX32("iobase", ISAParallelState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("iobase", ISAParallelState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("irq", ISAParallelState, isairq, 7),
|
||||
DEFINE_PROP_CHR("chardev", ISAParallelState, state.chr),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
|
||||
@@ -88,7 +88,7 @@ static const VMStateDescription vmstate_isa_serial = {
|
||||
|
||||
static Property serial_isa_properties[] = {
|
||||
DEFINE_PROP_UINT32("index", ISASerialState, index, -1),
|
||||
DEFINE_PROP_HEX32("iobase", ISASerialState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("iobase", ISASerialState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("irq", ISASerialState, isairq, -1),
|
||||
DEFINE_PROP_CHR("chardev", ISASerialState, state.chr),
|
||||
DEFINE_PROP_UINT32("wakeup", ISASerialState, state.wakeup, 0),
|
||||
|
||||
@@ -179,15 +179,6 @@ PropertyInfo qdev_prop_uint8 = {
|
||||
.set = set_uint8,
|
||||
};
|
||||
|
||||
/* --- 8bit hex value --- */
|
||||
|
||||
PropertyInfo qdev_prop_hex8 = {
|
||||
.name = "uint8",
|
||||
.legacy_name = "hex8",
|
||||
.get = get_uint8,
|
||||
.set = set_uint8,
|
||||
};
|
||||
|
||||
/* --- 16bit integer --- */
|
||||
|
||||
static void get_uint16(Object *obj, Visitor *v, void *opaque,
|
||||
@@ -285,15 +276,6 @@ PropertyInfo qdev_prop_int32 = {
|
||||
.set = set_int32,
|
||||
};
|
||||
|
||||
/* --- 32bit hex value --- */
|
||||
|
||||
PropertyInfo qdev_prop_hex32 = {
|
||||
.name = "uint32",
|
||||
.legacy_name = "hex32",
|
||||
.get = get_uint32,
|
||||
.set = set_uint32,
|
||||
};
|
||||
|
||||
/* --- 64bit integer --- */
|
||||
|
||||
static void get_uint64(Object *obj, Visitor *v, void *opaque,
|
||||
@@ -327,15 +309,6 @@ PropertyInfo qdev_prop_uint64 = {
|
||||
.set = set_uint64,
|
||||
};
|
||||
|
||||
/* --- 64bit hex value --- */
|
||||
|
||||
PropertyInfo qdev_prop_hex64 = {
|
||||
.name = "uint64",
|
||||
.legacy_name = "hex64",
|
||||
.get = get_uint64,
|
||||
.set = set_uint64,
|
||||
};
|
||||
|
||||
/* --- string --- */
|
||||
|
||||
static void release_string(Object *obj, const char *name, void *opaque)
|
||||
|
||||
+1
-1
@@ -524,7 +524,7 @@ static void g364fb_sysbus_reset(DeviceState *d)
|
||||
}
|
||||
|
||||
static Property g364fb_sysbus_properties[] = {
|
||||
DEFINE_PROP_HEX32("vram_size", G364SysBusState, g364.vram_size,
|
||||
DEFINE_PROP_UINT32("vram_size", G364SysBusState, g364.vram_size,
|
||||
8 * 1024 * 1024),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
+2
-2
@@ -617,11 +617,11 @@ static int tcx_init1(SysBusDevice *dev)
|
||||
}
|
||||
|
||||
static Property tcx_properties[] = {
|
||||
DEFINE_PROP_HEX32("vram_size", TCXState, vram_size, -1),
|
||||
DEFINE_PROP_UINT32("vram_size", TCXState, vram_size, -1),
|
||||
DEFINE_PROP_UINT16("width", TCXState, width, -1),
|
||||
DEFINE_PROP_UINT16("height", TCXState, height, -1),
|
||||
DEFINE_PROP_UINT16("depth", TCXState, depth, -1),
|
||||
DEFINE_PROP_HEX64("prom_addr", TCXState, prom_addr, -1),
|
||||
DEFINE_PROP_UINT64("prom_addr", TCXState, prom_addr, -1),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ static void i82374_isa_realize(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
static Property i82374_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", ISAi82374State, iobase, 0x400),
|
||||
DEFINE_PROP_UINT32("iobase", ISAi82374State, iobase, 0x400),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
|
||||
@@ -362,7 +362,7 @@ static int iommu_init1(SysBusDevice *dev)
|
||||
}
|
||||
|
||||
static Property iommu_properties[] = {
|
||||
DEFINE_PROP_HEX32("version", IOMMUState, version, 0),
|
||||
DEFINE_PROP_UINT32("version", IOMMUState, version, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -298,7 +298,7 @@ static void kvm_pit_realizefn(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
static Property kvm_pit_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", PITCommonState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1),
|
||||
DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", KVMPITState,
|
||||
lost_tick_policy, LOST_TICK_DELAY),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
|
||||
+2
-2
@@ -104,8 +104,8 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
|
||||
}
|
||||
|
||||
static Property isa_ide_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", ISAIDEState, iobase, 0x1f0),
|
||||
DEFINE_PROP_HEX32("iobase2", ISAIDEState, iobase2, 0x3f6),
|
||||
DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0),
|
||||
DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6),
|
||||
DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, 14),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ static int ide_drive_initfn(IDEDevice *dev)
|
||||
#define DEFINE_IDE_DEV_PROPERTIES() \
|
||||
DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \
|
||||
DEFINE_PROP_STRING("ver", IDEDrive, dev.version), \
|
||||
DEFINE_PROP_HEX64("wwn", IDEDrive, dev.wwn, 0), \
|
||||
DEFINE_PROP_UINT64("wwn", IDEDrive, dev.wwn, 0), \
|
||||
DEFINE_PROP_STRING("serial", IDEDrive, dev.serial),\
|
||||
DEFINE_PROP_STRING("model", IDEDrive, dev.model)
|
||||
|
||||
|
||||
@@ -123,9 +123,9 @@ static const VMStateDescription vmstate_pic_common = {
|
||||
};
|
||||
|
||||
static Property pic_properties_common[] = {
|
||||
DEFINE_PROP_HEX32("iobase", PICCommonState, iobase, -1),
|
||||
DEFINE_PROP_HEX32("elcr_addr", PICCommonState, elcr_addr, -1),
|
||||
DEFINE_PROP_HEX8("elcr_mask", PICCommonState, elcr_mask, -1),
|
||||
DEFINE_PROP_UINT32("iobase", PICCommonState, iobase, -1),
|
||||
DEFINE_PROP_UINT32("elcr_addr", PICCommonState, elcr_addr, -1),
|
||||
DEFINE_PROP_UINT8("elcr_mask", PICCommonState, elcr_mask, -1),
|
||||
DEFINE_PROP_BIT("master", PICCommonState, master, 0, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@ static const VMStateDescription vmstate_pc87312 = {
|
||||
};
|
||||
|
||||
static Property pc87312_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", PC87312State, iobase, 0x398),
|
||||
DEFINE_PROP_UINT32("iobase", PC87312State, iobase, 0x398),
|
||||
DEFINE_PROP_UINT8("config", PC87312State, config, 1),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ static void applesmc_isa_realize(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
static Property applesmc_isa_properties[] = {
|
||||
DEFINE_PROP_HEX32("iobase", AppleSMCState, iobase,
|
||||
DEFINE_PROP_UINT32("iobase", AppleSMCState, iobase,
|
||||
APPLESMC_DEFAULT_IOBASE),
|
||||
DEFINE_PROP_STRING("osk", AppleSMCState, osk),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user