From 6cf898c7673365ca8da6cd8f8eb3b99f47e4a4c0 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Tue, 16 Nov 1999 14:01:12 +0000 Subject: [PATCH] Mchines whose interrupts are not routed through the ISA pic were still registering their interrupts with rman as though they were going through the ISA pic. This prevents a conflict between isa & pci for irqs on such machines. Also hookup the chipset struct before calling platform.pci_intr_init(). This allows me to call inw/outw down in the platform code. Add interrupt printfs to match the CIA chipset. Reviewed by: dfr Tested by: wilko --- sys/alpha/pci/apecs.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c index 8b4ae9dd1897..ea1897e896d7 100644 --- a/sys/alpha/pci/apecs.c +++ b/sys/alpha/pci/apecs.c @@ -548,10 +548,11 @@ apecs_init() if (initted) return; initted = 1; + chipset = apecs_swiz_chipset; + if (platform.pci_intr_init) platform.pci_intr_init(); - chipset = apecs_swiz_chipset; } static int @@ -607,7 +608,8 @@ static struct resource * apecs_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - if (type == SYS_RES_IRQ) + if ((hwrpb->rpb_type == ST_DEC_2100_A50) && + (type == SYS_RES_IRQ)) return isa_alloc_intr(bus, child, start); else return pci_alloc_resource(bus, child, type, rid, @@ -618,7 +620,8 @@ static int apecs_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - if (type == SYS_RES_IRQ) + if ((hwrpb->rpb_type == ST_DEC_2100_A50) && + (type == SYS_RES_IRQ)) return isa_release_intr(bus, child, r); else return pci_release_resource(bus, child, type, rid, r); @@ -651,6 +654,11 @@ apecs_setup_intr(device_t dev, device_t child, /* Enable PCI interrupt */ platform.pci_intr_enable(irq->r_start); + + device_printf(child, "interrupting at APECS irq %d\n", + (int) irq->r_start); + + return 0; }