[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv3 14/16] apb: replace OBIO interrupt numbers in pci_
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-devel] [PATCHv3 14/16] apb: replace OBIO interrupt numbers in pci_pbmA_map_irq() with constants |
Date: |
Thu, 21 Dec 2017 08:20:43 +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 <address@hidden>
Reviewed-by: Artyom Tarasenko <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/pci-host/apb.c | 4 ++--
include/hw/pci-host/apb.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
index cb24bb2108..d043193c44 100644
--- a/hw/pci-host/apb.c
+++ b/hw/pci-host/apb.c
@@ -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;
diff --git a/include/hw/pci-host/apb.h b/include/hw/pci-host/apb.h
index 09ebd53f60..6194c8cbad 100644
--- a/include/hw/pci-host/apb.h
+++ b/include/hw/pci-host/apb.h
@@ -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
--
2.11.0
- Re: [Qemu-devel] [PATCHv3 05/16] sun4u: move initialisation of all ISABus devices into ebus_realize(), (continued)
- [Qemu-devel] [PATCHv3 02/16] sun4u: ebus QOMify tidy-up, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 01/16] apb: move QOM macros and typedefs from apb.c to apb.h, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 09/16] apb: move the two secondary PCI bridges objects into APBState, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 08/16] apb: use gpios to wire up the apb device to the SPARC CPU IRQs, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 10/16] apb: remove pci_apb_init() and instantiate APB device using qdev, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 16/16] sun4u: switch from EBUS_DPRINTF() macro to trace-events, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 15/16] sparc64: introduce trace-events for hw/sparc64, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 14/16] apb: replace OBIO interrupt numbers in pci_pbmA_map_irq() with constants,
Mark Cave-Ayland <=
- [Qemu-devel] [PATCHv3 13/16] ebus: wire up OBIO interrupts to APB pbm via qdev GPIOs, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 11/16] apb: split pci_pbm_map_irq() into separate functions for bus A and bus B, Mark Cave-Ayland, 2017/12/21
- [Qemu-devel] [PATCHv3 12/16] apb: remove busA property from PBMPCIBridge state, Mark Cave-Ayland, 2017/12/21