summaryrefslogtreecommitdiffstats
path: root/sys/alpha/pci/t2.c
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2001-06-01 17:39:11 +0000
committergallatin <gallatin@FreeBSD.org>2001-06-01 17:39:11 +0000
commit97157b4d0e8357e515eacbc41d938e44f28c9b9d (patch)
tree3e6d0a9770f3def6c2b401ae01aa0e8e8a31eeac /sys/alpha/pci/t2.c
parent05769a88e298bb6f61223081bbaea61377bce088 (diff)
downloadFreeBSD-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/t2.c')
-rw-r--r--sys/alpha/pci/t2.c105
1 files changed, 0 insertions, 105 deletions
diff --git a/sys/alpha/pci/t2.c b/sys/alpha/pci/t2.c
index 05c0a0b..815f0be 100644
--- a/sys/alpha/pci/t2.c
+++ b/sys/alpha/pci/t2.c
@@ -371,111 +371,6 @@ t2_attach(device_t dev)
return 0;
}
-/*
- * Map pci slot & INTx pin to the ICIC interrupt value for our PCIs.
- */
-
-static int
-t2_ICIC_slot_to_STDIO_irq(device_t bus, device_t dev, int pin)
-{
-
- int ret_irq = 0;
-
- /*
- * Return the interrupt pin number for the PCI slots.
- */
-
- /*
- * Generate the proper interrupt conversion for the physical
- * PCI slots (for both the primary PCI slots and those behind
- * a PPB).
- */
- /*
- * XXX This code is wrong; we need to determine the correct
- * swizzle for devices behind the onboard PCI:PCI bridge
- * and ensure that the generic bridge code doesn't try to
- * reroute them.
- */
- if ((pci_get_slot(dev) >= 6) && (pci_get_slot(dev) <= 9)) {
- ret_irq = (32 + (4 * (pci_get_slot(dev) - 6))) +
- (pin - 1) + (16 * pci_get_bus(dev));
- return (ret_irq);
- }
-
- /* Convert the NCR810A chip behind the PPB */
- if (pci_get_slot(dev) == 1) {
- ret_irq = 28;
- return (ret_irq);
- }
-
- /*
- * Convert the NCR810A chip on the primary PCI bus or the
- * TULIP chip behind the PPB. There is no system that has
- * both, so there really is no sharing going on although it
- * looks like it.
- */
- if ((pci_get_slot(dev) == 4) || (pci_get_slot(dev) == 0)) {
- ret_irq = 24;
- return (ret_irq);
- }
-
- printf("ICIC invalid pci slot: 0x%x intpin: 0x%x bus num:0x%x\n",
- pci_get_slot(dev), pin, pci_get_bus(dev));
- return(-1);
-}
-
-/*
- * Map pci slot & INTx pin to STDIO's 8259 irq input value for PCI0.
- */
-
-static int
-t2_pci0_slot_to_STDIO_irq(device_t bus, device_t dev, int pin)
-{
-
- switch(pci_get_slot(dev)) {
- case 0: /* ethernet (tulip) port */
- return(0x2);
- case 1: /* scsi 810 */
- return(0x1);
- case 6: /* optional slot 0 */
- switch (pin) {
- case 1: return(0x0);
- case 2: return(0x18);
- case 3: return(0x1a);
- case 4: return(0x1d);
- }
- case 7: /* optional slot 1 */
- switch (pin) {
- case 1: return(0x4);
- case 2: return(0x19);
- case 3: return(0x1b);
- case 4: return(0x1e);
- }
- case 8: /* optional slot 2 */
- switch (pin) {
- case 1: return(0x5);
- case 2: return(0x14);
- case 3: return(0x1c);
- case 4: return(0x1f);
- }
- default: /* invalid slot */
- printf("PCI slot %d unknown\n", pci_get_slot(dev));
- return(-1);
- }
- printf("invalid pci0 intpin slot: 0x%x intpin: 0x%x\n",
- pci_get_slot(dev), pin);
- return (-1);
-}
-
-int
-t2_intr_route(device_t bus, device_t dev, int pin)
-{
- if (pci_int_type[0]) {
- return (t2_ICIC_slot_to_STDIO_irq(bus, dev, pin));
- } else {
- return (t2_pci0_slot_to_STDIO_irq(bus, dev, pin));
- }
-}
/*
* magical mystery table partly obtained from Linux
OpenPOWER on IntegriCloud