diff options
author | Marcel Apfelbaum <marcel.a@redhat.com> | 2013-10-07 10:36:39 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-10-14 17:11:45 +0300 |
commit | 9e64f8a3fcc88a508990a62ecc5a1269e41272ad (patch) | |
tree | cc9461940fb228d4b0e8cf9b945785b374a5da41 /hw/usb/hcd-uhci.c | |
parent | 68919cace8242363edfe8ff9b9c68b5e58c30db4 (diff) |
hw: set interrupts using pci irq wrappers
pci_set_irq and the other pci irq wrappers use
PCI_INTERRUPT_PIN config register to compute device
INTx pin to assert/deassert.
An irq is allocated using pci_allocate_irq wrapper
only if is needed by non pci devices.
Removed irq related fields from state if not used anymore.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/usb/hcd-uhci.c')
-rw-r--r-- | hw/usb/hcd-uhci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index becc7faec1..238d1d2b5f 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -164,7 +164,6 @@ struct UHCIState { /* Interrupts that should be raised at the end of the current frame. */ uint32_t pending_int_mask; - int irq_pin; /* Active packets */ QTAILQ_HEAD(, UHCIQueue) queues; @@ -381,7 +380,7 @@ static void uhci_update_irq(UHCIState *s) } else { level = 0; } - qemu_set_irq(s->dev.irq[s->irq_pin], level); + pci_set_irq(&s->dev, level); } static void uhci_reset(void *opaque) @@ -1240,8 +1239,7 @@ static int usb_uhci_common_initfn(PCIDevice *dev) /* TODO: reset value should be 0. */ pci_conf[USB_SBRN] = USB_RELEASE_1; // release number - s->irq_pin = u->info.irq_pin; - pci_config_set_interrupt_pin(pci_conf, s->irq_pin + 1); + pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1); if (s->masterbus) { USBPort *ports[NB_PORTS]; |