From 319ba9f52737fc79de5c2c6abd059933398b72d5 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 1 Feb 2012 20:31:40 +0100 Subject: i8254: Pass alternative IRQ output object on initialization HPET legacy emulation will require control over the PIT IRQ output. To enable this, add support for an alternative IRQ output object to the PIT factory function. If the isa_irq number is < 0, this object will be used. This also removes the IRQ number property from the PIT class as we now use a generic GPIO output pin that is connected by the factory function. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- hw/i8254.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/i8254.c') diff --git a/hw/i8254.c b/hw/i8254.c index 71ea849d1d..aa7e9fc732 100644 --- a/hw/i8254.c +++ b/hw/i8254.c @@ -57,7 +57,6 @@ typedef struct PITChannelState { typedef struct PITState { ISADevice dev; MemoryRegion ioports; - uint32_t irq; uint32_t iobase; PITChannelState channels[3]; } PITState; @@ -532,7 +531,7 @@ static int pit_initfn(ISADevice *dev) s = &pit->channels[0]; /* the timer 0 is connected to an IRQ */ s->irq_timer = qemu_new_timer_ns(vm_clock, pit_irq_timer, s); - s->irq = isa_get_irq(dev, pit->irq); + qdev_init_gpio_out(&dev->qdev, &s->irq, 1); memory_region_init_io(&pit->ioports, &pit_ioport_ops, pit, "pit", 4); isa_register_ioport(dev, &pit->ioports, pit->iobase); @@ -543,7 +542,6 @@ static int pit_initfn(ISADevice *dev) } static Property pit_properties[] = { - DEFINE_PROP_UINT32("irq", PITState, irq, -1), DEFINE_PROP_HEX32("iobase", PITState, iobase, -1), DEFINE_PROP_END_OF_LIST(), }; -- cgit v1.2.3