summary refs log tree commit diff stats
path: root/hw/usb
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2023-11-26 23:49:30 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-28 14:26:37 +0100
commit032a443be6ae472d9b2cb19ed03afe302f47e47f (patch)
tree3ac0103b5c7588d99c9a8b5d662c2b519f64c5cb /hw/usb
parent7e01bd80c1580aa523d2a35c433d57266b9a396a (diff)
downloadfocaccia-qemu-032a443be6ae472d9b2cb19ed03afe302f47e47f.tar.gz
focaccia-qemu-032a443be6ae472d9b2cb19ed03afe302f47e47f.zip
hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts
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 422a6e8075752bc5342afd3eace23a4990dd7d98.

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>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/vt82c686-uhci-pci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/usb/vt82c686-uhci-pci.c b/hw/usb/vt82c686-uhci-pci.c
index b4884c9011..6162806172 100644
--- a/hw/usb/vt82c686-uhci-pci.c
+++ b/hw/usb/vt82c686-uhci-pci.c
@@ -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);
@@ -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[] = {