Skip to content

Commit

Permalink
hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts
Browse files Browse the repository at this point in the history
This device is part of a superio/ISA bridge chip and IRQs from it are
routed to an ISA interrupt. Use via_isa_set_irq() function to implement
this in a vt82c686-uhci-pci specific irq handler.

This reverts commit 422a6e8.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-ID: <ed5cdeaba7cf01eebdaa35f84c63427f4d8876b1.1701035944.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
  • Loading branch information
zbalaton authored and philmd committed Nov 28, 2023
1 parent 7e01bd8 commit 032a443
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hw/usb/vt82c686-uhci-pci.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/isa/vt82c686.h"
#include "hcd-uhci.h"

static void uhci_isa_set_irq(void *opaque, int irq_num, int level)
{
UHCIState *s = opaque;
via_isa_set_irq(&s->dev, 0, level);
}

static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Error **errp)
{
UHCIState *s = UHCI(dev);
Expand All @@ -15,6 +22,8 @@ static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Error **errp)
pci_set_long(pci_conf + 0xc0, 0x00002000);

usb_uhci_common_realize(dev, errp);
object_unref(s->irq);
s->irq = qemu_allocate_irq(uhci_isa_set_irq, s, 0);
}

static UHCIInfo uhci_info[] = {
Expand Down

0 comments on commit 032a443

Please sign in to comment.