summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2000-03-18 07:57:58 +0000
committermjacob <mjacob@FreeBSD.org>2000-03-18 07:57:58 +0000
commit39774c0cfa67ffc5f53e844d55468471cea06f51 (patch)
treeb5f36b5b30eff3f93a4d985946ee35edcb7c75d6 /sys
parent3e368a336859c7d2c40a5552bab017a9f0115aac (diff)
downloadFreeBSD-src-39774c0cfa67ffc5f53e844d55468471cea06f51.zip
FreeBSD-src-39774c0cfa67ffc5f53e844d55468471cea06f51.tar.gz
Alpha 8200: Do some compilation cleanup. Conditionalize some IDE stuff
based upon presence/absence of ISA (there is no ISA bus on an 8200- okay, well, there *could* be one in a DWLPX tray, but we don't support it)). Most importantly change the interrupt resource map to cover a whole 16 bits. The 8200 uses 16 bit interrupt vectors which we construct that contain the I/O-board, hose, an pci slot in them, and then we write these vectors into the appropriate DWLPX registers. At any rate, a flat array of 64 'IRQs' isn't enough.
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/pci/pcibus.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/sys/alpha/pci/pcibus.c b/sys/alpha/pci/pcibus.c
index a137558..aaaff7b 100644
--- a/sys/alpha/pci/pcibus.c
+++ b/sys/alpha/pci/pcibus.c
@@ -45,6 +45,8 @@
#include <alpha/pci/pcibus.h>
#include <alpha/isa/isavar.h>
+#include "isa.h"
+
char chipset_type[10];
int chipset_bwx = 0;
long chipset_ports = 0;
@@ -140,6 +142,7 @@ alpha_platform_assign_pciintr(pcicfgregs *cfg)
platform.pci_intr_map((void *)cfg);
}
+#if NISA > 0
struct resource *
alpha_platform_alloc_ide_intr(int chan)
{
@@ -166,17 +169,43 @@ alpha_platform_teardown_ide_intr(struct resource *res, void *cookie)
{
return isa_teardown_intr(0, 0, res, cookie);
}
+#else
+struct resource *
+alpha_platform_alloc_ide_intr(int chan)
+{
+ return (NULL);
+}
+int
+alpha_platform_release_ide_intr(int chan, struct resource *res)
+{
+ return (ENXIO);
+}
+
+int
+alpha_platform_setup_ide_intr(struct resource *res,
+ driver_intr_t *fn, void *arg, void **cookiep)
+{
+ return (ENXIO);
+}
+
+int
+alpha_platform_teardown_ide_intr(struct resource *res, void *cookie)
+{
+ return (ENXIO);
+}
+#endif
static struct rman irq_rman, port_rman, mem_rman;
-void pci_init_resources()
+void
+pci_init_resources(void)
{
irq_rman.rm_start = 0;
- irq_rman.rm_end = 64;
+ irq_rman.rm_end = 65536;
irq_rman.rm_type = RMAN_ARRAY;
- irq_rman.rm_descr = "PCI Interrupt request lines";
+ irq_rman.rm_descr = "PCI Mapped Interrupts";
if (rman_init(&irq_rman)
- || rman_manage_region(&irq_rman, 0, 63))
+ || rman_manage_region(&irq_rman, 0, 65536))
panic("pci_init_resources irq_rman");
port_rman.rm_start = 0;
@@ -233,9 +262,9 @@ pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
rman_set_bustag(rv, ALPHA_BUS_SPACE_MEM);
rman_set_bushandle(rv, rv->r_start);
if (flags & PCI_RF_DENSE)
- rman_set_virtual(rv, pci_cvt_to_dense(rv->r_start));
+ rman_set_virtual(rv, (void *) pci_cvt_to_dense(rv->r_start));
else if (flags & PCI_RF_BWX)
- rman_set_virtual(rv, pci_cvt_to_bwx(rv->r_start));
+ rman_set_virtual(rv, (void *) pci_cvt_to_bwx(rv->r_start));
else
rman_set_virtual(rv, (void *) rv->r_start); /* maybe NULL? */
break;
OpenPOWER on IntegriCloud