mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
kvm/i8254: QOM'ify some more
Introduce type constant and cast macro to obsolete DO_UPCAST(). Prepares for PIT realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
@@ -38,6 +38,7 @@ typedef struct PITChannelInfo {
|
||||
} PITChannelInfo;
|
||||
|
||||
#define TYPE_I8254 "isa-pit"
|
||||
#define TYPE_KVM_I8254 "kvm-pit"
|
||||
|
||||
static inline ISADevice *pit_init(ISABus *bus, int base, int isa_irq,
|
||||
qemu_irq alt_irq)
|
||||
@@ -57,13 +58,15 @@ static inline ISADevice *pit_init(ISABus *bus, int base, int isa_irq,
|
||||
|
||||
static inline ISADevice *kvm_pit_init(ISABus *bus, int base)
|
||||
{
|
||||
ISADevice *dev;
|
||||
DeviceState *dev;
|
||||
ISADevice *d;
|
||||
|
||||
dev = isa_create(bus, "kvm-pit");
|
||||
qdev_prop_set_uint32(&dev->qdev, "iobase", base);
|
||||
qdev_init_nofail(&dev->qdev);
|
||||
d = isa_create(bus, TYPE_KVM_I8254);
|
||||
dev = DEVICE(d);
|
||||
qdev_prop_set_uint32(dev, "iobase", base);
|
||||
qdev_init_nofail(dev);
|
||||
|
||||
return dev;
|
||||
return d;
|
||||
}
|
||||
|
||||
void pit_set_gate(ISADevice *dev, int channel, int val);
|
||||
|
||||
Reference in New Issue
Block a user