]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
apb: replace OBIO interrupt numbers in pci_pbmA_map_irq() with constants
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 21 Dec 2017 07:32:57 +0000 (07:32 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tue, 9 Jan 2018 21:48:19 +0000 (21:48 +0000)
Following on from the previous commit, we can also do the same with
with legacy OBIO interrupts in pci_pbmA_map_irq().

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/pci-host/apb.c
include/hw/pci-host/apb.h

index 54edbddb0350a81ff63141d680a4572aa2ab4c86..44b08c090ec6329cdd2e4716c1ff297ab3c8fc16 100644 (file)
@@ -523,10 +523,10 @@ static int pci_pbmA_map_irq(PCIDevice *pci_dev, int irq_num)
     switch (PCI_SLOT(pci_dev->devfn)) {
     case 1:
         /* Onboard NIC */
-        return 0x21;
+        return OBIO_NIC_IRQ;
     case 3:
         /* Onboard IDE */
-        return 0x20;
+        return OBIO_HDD_IRQ;
     default:
         /* Normal intno, fall through */
         break;
index 09ebd53f60b1075416d14260ad9ccce6d7f271f9..6194c8cbadf8866de9c6050ef09d6bee0e2ecb84 100644 (file)
@@ -53,6 +53,8 @@ typedef struct IOMMUState {
 #define MAX_IVEC 0x40
 
 /* OBIO IVEC IRQs */
+#define OBIO_HDD_IRQ         0x20
+#define OBIO_NIC_IRQ         0x21
 #define OBIO_LPT_IRQ         0x22
 #define OBIO_FDD_IRQ         0x27
 #define OBIO_KBD_IRQ         0x29