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.
This commit is contained in:
Matt Jacob 2000-03-18 07:57:58 +00:00
parent 8ad895a6a9
commit 9ca20275e0

View File

@ -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;