mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06: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:
parent
3afe7e14a4
commit
58cd986422
2 changed files with 19 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue