diff options
author | gallatin <gallatin@FreeBSD.org> | 2001-06-01 17:39:11 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2001-06-01 17:39:11 +0000 |
commit | 97157b4d0e8357e515eacbc41d938e44f28c9b9d (patch) | |
tree | 3e6d0a9770f3def6c2b401ae01aa0e8e8a31eeac /sys/alpha/pci/apecs_pci.c | |
parent | 05769a88e298bb6f61223081bbaea61377bce088 (diff) | |
download | FreeBSD-src-97157b4d0e8357e515eacbc41d938e44f28c9b9d.zip FreeBSD-src-97157b4d0e8357e515eacbc41d938e44f28c9b9d.tar.gz |
Resurrect platform.pci_intr_map() and essentially undo the effects of
the interface conversion to platform.pci_intr_route(). I've left the
platform.pci_intr_route() function pointer in place, as well as
alpha_pci_route_interrupt(), but no platform currently implements it.
To work around the removal of alpha_platform_assign_pciintr(cfg);
from the pci probe code, I've hooked in calls to platform.pci_intr_map()
in pcib_read_config (similar to the x86 APIC_IO ifdef in pci_cfgregread)
for every chipset that has a platform which needs it.
While here, I've removed the interupt mapping/routing code from the
AS2x00 platform because its not required (it has never been present in
-stable).
Tested on: UP1000, Miata(GL), XP1000, AS2100, AS500
Diffstat (limited to 'sys/alpha/pci/apecs_pci.c')
-rw-r--r-- | sys/alpha/pci/apecs_pci.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/alpha/pci/apecs_pci.c b/sys/alpha/pci/apecs_pci.c index e18daa6..b3c428f 100644 --- a/sys/alpha/pci/apecs_pci.c +++ b/sys/alpha/pci/apecs_pci.c @@ -33,7 +33,9 @@ #include <sys/bus.h> #include <machine/bus.h> #include <sys/rman.h> +#include <pci/pcireg.h> #include <pci/pcivar.h> +#include <machine/cpuconf.h> #include <machine/swiz.h> #include <machine/md_var.h> #include <machine/rpb.h> @@ -166,6 +168,19 @@ u_int32_t apecs_pcib_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width) { + pcicfgregs cfg; + + if ((reg == PCIR_INTLINE) && (width == 1) && + (platform.pci_intr_map != NULL)) { + cfg.bus = b; + cfg.slot = s; + cfg.func = f; + cfg.intline = 255; + platform.pci_intr_map((void *)&cfg); + if (cfg.intline != 255) + return cfg.intline; + } + switch (width) { case 1: SWIZ_CFGREAD(b, s, f, reg, BYTE, u_int8_t); |