Commit a5546222 authored by Mark Cave-Ayland's avatar Mark Cave-Ayland
Browse files

apb: replace OBIO interrupt numbers in pci_pbmA_map_irq() with constants



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: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: default avatarArtyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
parent 4b10c8d7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
+2 −0
Original line number Diff line number Diff line
@@ -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