diff options
author | gallatin <gallatin@FreeBSD.org> | 1999-11-16 14:01:12 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 1999-11-16 14:01:12 +0000 |
commit | 38624696710615133b9ae1ac7817c9844f18c713 (patch) | |
tree | 661ca5093603e2e2d80793cd1816f5cd953db98f | |
parent | fe1f8fe49a616d92041abe2b0163e23a1862752d (diff) | |
download | FreeBSD-src-38624696710615133b9ae1ac7817c9844f18c713.zip FreeBSD-src-38624696710615133b9ae1ac7817c9844f18c713.tar.gz |
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
-rw-r--r-- | sys/alpha/pci/apecs.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c index 8b4ae9d..ea1897e 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; } |