diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-07 18:14:41 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-07 18:14:41 +0000 |
commit | d537cf6c8624b27ce2b63431d2f8937f6356f652 (patch) | |
tree | d7173d79977b4426b2ff225b35c839c8a2e4a215 /hw/piix_pci.c | |
parent | b6e27ab8b12ef6075d85fc505f821643804a3a79 (diff) |
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r-- | hw/piix_pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 1b16652bc0..095698c9de 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -40,7 +40,7 @@ static uint32_t i440fx_addr_readl(void* opaque, uint32_t addr) return s->config_reg; } -static void piix3_set_irq(void *pic, int irq_num, int level); +static void piix3_set_irq(qemu_irq *pic, int irq_num, int level); /* return the global irq number corresponding to a given device irq pin. We could also use the bus number to have a more precise @@ -155,14 +155,14 @@ static int i440fx_load(QEMUFile* f, void *opaque, int version_id) return 0; } -PCIBus *i440fx_init(PCIDevice **pi440fx_state) +PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic) { PCIBus *b; PCIDevice *d; I440FXState *s; s = qemu_mallocz(sizeof(I440FXState)); - b = pci_register_bus(piix3_set_irq, pci_slot_get_pirq, NULL, 0, 4); + b = pci_register_bus(piix3_set_irq, pci_slot_get_pirq, pic, 0, 4); s->bus = b; register_ioport_write(0xcf8, 4, 4, i440fx_addr_writel, s); @@ -204,7 +204,7 @@ PCIDevice *piix4_dev; static int pci_irq_levels[4]; -static void piix3_set_irq(void *pic, int irq_num, int level) +static void piix3_set_irq(qemu_irq *pic, int irq_num, int level) { int i, pic_irq, pic_level; @@ -221,7 +221,7 @@ static void piix3_set_irq(void *pic, int irq_num, int level) if (pic_irq == piix3_dev->config[0x60 + i]) pic_level |= pci_irq_levels[i]; } - pic_set_irq(pic_irq, pic_level); + qemu_set_irq(pic[pic_irq], pic_level); } } |