From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, "Michael Rolnik" <mrolnik@gmail.com>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>
Subject: [PULL 3/7] hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts
Date: Tue, 28 Nov 2023 14:37:36 +0100 [thread overview]
Message-ID: <20231128133740.64525-4-philmd@linaro.org> (raw)
In-Reply-To: <20231128133740.64525-1-philmd@linaro.org>
From: BALATON Zoltan <balaton@eik.bme.hu>
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>
---
hw/usb/vt82c686-uhci-pci.c | 9 +++++++++
1 file changed, 9 insertions(+)
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[] = {
--
2.41.0
next prev parent reply other threads:[~2023-11-28 13:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 13:37 [PULL 0/7] Misc fixes for 2023-11-28 Philippe Mathieu-Daudé
2023-11-28 13:37 ` [PULL 1/7] target/hexagon/idef-parser/prepare: use env to invoke bash Philippe Mathieu-Daudé
2023-11-28 13:37 ` [PULL 2/7] hw/isa/vt82c686: Bring back via_isa_set_irq() Philippe Mathieu-Daudé
2023-11-28 13:37 ` Philippe Mathieu-Daudé [this message]
2023-11-28 13:37 ` [PULL 4/7] hw/isa/vt82c686: Route PIRQ inputs using via_isa_set_irq() Philippe Mathieu-Daudé
2023-11-28 13:37 ` [PULL 5/7] hw/audio/via-ac97: Route interrupts " Philippe Mathieu-Daudé
2023-11-28 13:37 ` [PULL 6/7] hw/avr/atmega: Fix wrong initial value of stack pointer Philippe Mathieu-Daudé
2023-11-28 13:37 ` [PULL 7/7] docs/s390: Fix wrong command example in s390-cpu-topology.rst Philippe Mathieu-Daudé
2023-11-28 23:14 ` [PULL 0/7] Misc fixes for 2023-11-28 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231128133740.64525-4-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=jiaxun.yang@flygoat.com \
--cc=kraxel@redhat.com \
--cc=mrolnik@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).