summaryrefslogtreecommitdiffstats
path: root/sys/alpha/pci
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2001-05-23 19:44:17 +0000
committerdfr <dfr@FreeBSD.org>2001-05-23 19:44:17 +0000
commit2434332d91b4f39ff3786b3aab3122174307715e (patch)
tree61074a40ef2eba99c2d03a6241a1a87ab4851204 /sys/alpha/pci
parent3f4e4d353ca694c8535f3410280128fde8e1cc06 (diff)
downloadFreeBSD-src-2434332d91b4f39ff3786b3aab3122174307715e.zip
FreeBSD-src-2434332d91b4f39ff3786b3aab3122174307715e.tar.gz
Make sure that all resource allocation is handled in the pcib device, not
the chipset. This is already how the multi-hose systems handle resource allocation and it fixes a bug where dense and bwx memory allocations were not handled properly. Reviewed by: gallatin
Diffstat (limited to 'sys/alpha/pci')
-rw-r--r--sys/alpha/pci/apecs.c35
-rw-r--r--sys/alpha/pci/apecs_pci.c36
-rw-r--r--sys/alpha/pci/cia.c6
-rw-r--r--sys/alpha/pci/cia_pci.c11
-rw-r--r--sys/alpha/pci/irongate.c10
-rw-r--r--sys/alpha/pci/irongate_pci.c10
-rw-r--r--sys/alpha/pci/lca.c35
-rw-r--r--sys/alpha/pci/lca_pci.c33
-rw-r--r--sys/alpha/pci/t2.c11
-rw-r--r--sys/alpha/pci/t2_pci.c11
-rw-r--r--sys/alpha/pci/tsunami.c6
-rw-r--r--sys/alpha/pci/tsunami_pci.c5
12 files changed, 90 insertions, 119 deletions
diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c
index ba71978..4b30176 100644
--- a/sys/alpha/pci/apecs.c
+++ b/sys/alpha/pci/apecs.c
@@ -69,7 +69,6 @@
#include <alpha/pci/apecsreg.h>
#include <alpha/pci/apecsvar.h>
-#include <alpha/pci/pcibus.h>
#include <alpha/isa/isavar.h>
#include <machine/intr.h>
#include <machine/resource.h>
@@ -151,12 +150,6 @@ apecs_write_hae(u_int64_t hae)
static int apecs_probe(device_t dev);
static int apecs_attach(device_t dev);
-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);
-static int apecs_release_resource(device_t bus, device_t child,
- int type, int rid, struct resource *r);
static int apecs_setup_intr(device_t dev, device_t child,
struct resource *irq, int flags,
driver_intr_t *intr, void *arg, void **cookiep);
@@ -169,10 +162,6 @@ static device_method_t apecs_methods[] = {
DEVMETHOD(device_attach, apecs_attach),
/* Bus interface */
- DEVMETHOD(bus_alloc_resource, apecs_alloc_resource),
- DEVMETHOD(bus_release_resource, apecs_release_resource),
- DEVMETHOD(bus_activate_resource, pci_activate_resource),
- DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, apecs_setup_intr),
DEVMETHOD(bus_teardown_intr, apecs_teardown_intr),
@@ -280,7 +269,6 @@ apecs_probe(device_t dev)
}
apecs_hae_mem = REGVAL(EPIC_HAXR1);
- pci_init_resources();
isa_init_intr();
apecs_init_sgmap();
@@ -314,29 +302,6 @@ apecs_attach(device_t dev)
return 0;
}
-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 ((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,
- start, end, count, flags);
-}
-
-static int
-apecs_release_resource(device_t bus, device_t child, int type, int rid,
- struct resource *r)
-{
- 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);
-}
-
static void
apecs_disable_intr(int vector)
{
diff --git a/sys/alpha/pci/apecs_pci.c b/sys/alpha/pci/apecs_pci.c
index 2190748..e18daa6 100644
--- a/sys/alpha/pci/apecs_pci.c
+++ b/sys/alpha/pci/apecs_pci.c
@@ -36,9 +36,13 @@
#include <pci/pcivar.h>
#include <machine/swiz.h>
#include <machine/md_var.h>
+#include <machine/rpb.h>
+#include <machine/resource.h>
#include <alpha/pci/apecsreg.h>
#include <alpha/pci/apecsvar.h>
+#include <alpha/pci/pcibus.h>
+#include <alpha/isa/isavar.h>
#include "alphapci_if.h"
#include "pcib_if.h"
@@ -52,6 +56,7 @@ apecs_pcib_probe(device_t dev)
{
device_set_desc(dev, "2107x PCI host bus adapter");
+ pci_init_resources();
device_add_child(dev, "pci", 0);
return 0;
@@ -67,6 +72,29 @@ apecs_pcib_read_ivar(device_t dev, device_t child, int which, u_long *result)
return ENOENT;
}
+static struct resource *
+apecs_pcib_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 ((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,
+ start, end, count, flags);
+}
+
+static int
+apecs_pcib_release_resource(device_t bus, device_t child, int type, int rid,
+ struct resource *r)
+{
+ 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);
+}
+
static void *
apecs_pcib_cvt_dense(device_t dev, vm_offset_t addr)
{
@@ -175,10 +203,10 @@ static device_method_t apecs_pcib_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, apecs_pcib_read_ivar),
- DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
- DEVMETHOD(bus_release_resource, bus_generic_release_resource),
- DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
- DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_alloc_resource, apecs_pcib_alloc_resource),
+ DEVMETHOD(bus_release_resource, apecs_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, pci_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/alpha/pci/cia.c b/sys/alpha/pci/cia.c
index f48c663..c02130f 100644
--- a/sys/alpha/pci/cia.c
+++ b/sys/alpha/pci/cia.c
@@ -105,7 +105,6 @@
#include <alpha/pci/ciareg.h>
#include <alpha/pci/ciavar.h>
-#include <alpha/pci/pcibus.h>
#include <alpha/isa/isavar.h>
#include <machine/bwx.h>
#include <machine/swiz.h>
@@ -196,10 +195,6 @@ static device_method_t cia_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_alloc_resource, pci_alloc_resource),
- DEVMETHOD(bus_release_resource, pci_release_resource),
- DEVMETHOD(bus_activate_resource, pci_activate_resource),
- DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, cia_setup_intr),
DEVMETHOD(bus_teardown_intr, cia_teardown_intr),
@@ -393,7 +388,6 @@ cia_probe(device_t dev)
cia0 = dev;
device_set_desc(dev, "2117x Core Logic chipset"); /* XXX */
- pci_init_resources();
isa_init_intr();
cia_rev = REGVAL(CIA_CSR_REV) & REV_MASK;
diff --git a/sys/alpha/pci/cia_pci.c b/sys/alpha/pci/cia_pci.c
index 2a36ba2..a5ae95b 100644
--- a/sys/alpha/pci/cia_pci.c
+++ b/sys/alpha/pci/cia_pci.c
@@ -103,6 +103,8 @@
#include <alpha/pci/ciareg.h>
#include <alpha/pci/ciavar.h>
+#include <alpha/pci/pcibus.h>
+#include <alpha/isa/isavar.h>
#include "alphapci_if.h"
#include "pcib_if.h"
@@ -116,6 +118,7 @@ cia_pcib_probe(device_t dev)
{
device_set_desc(dev, "2117x PCI host bus adapter");
+ pci_init_resources();
device_add_child(dev, "pci", 0);
return 0;
@@ -395,10 +398,10 @@ static device_method_t cia_pcib_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, cia_pcib_read_ivar),
- DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
- DEVMETHOD(bus_release_resource, bus_generic_release_resource),
- DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
- DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_alloc_resource, pci_alloc_resource),
+ DEVMETHOD(bus_release_resource, pci_release_resource),
+ DEVMETHOD(bus_activate_resource, pci_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, alpha_platform_pci_setup_intr),
DEVMETHOD(bus_teardown_intr, alpha_platform_pci_teardown_intr),
diff --git a/sys/alpha/pci/irongate.c b/sys/alpha/pci/irongate.c
index b1ba10d..17bdd33 100644
--- a/sys/alpha/pci/irongate.c
+++ b/sys/alpha/pci/irongate.c
@@ -43,7 +43,6 @@
#include <alpha/isa/isavar.h>
#include <alpha/pci/irongatereg.h>
#include <alpha/pci/irongatevar.h>
-#include <alpha/pci/pcibus.h>
#include <machine/bwx.h>
#include <machine/intr.h>
#include <machine/intrcnt.h>
@@ -100,10 +99,6 @@ static device_method_t irongate_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_alloc_resource, pci_alloc_resource),
- DEVMETHOD(bus_release_resource, pci_release_resource),
- DEVMETHOD(bus_activate_resource, pci_activate_resource),
- DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, isa_setup_intr),
DEVMETHOD(bus_teardown_intr, isa_teardown_intr),
@@ -131,8 +126,8 @@ irongate_init()
bwx_init_space(&io_space, KV(IRONGATE_IO));
bwx_init_space(&mem_space, KV(IRONGATE_MEM));
- busspace_isa_io = (kobj_t) &io_space;
- busspace_isa_mem = (kobj_t) &mem_space;
+ busspace_isa_io = (struct alpha_busspace *) &io_space;
+ busspace_isa_mem = (struct alpha_busspace *) &mem_space;
if (platform.pci_intr_init)
platform.pci_intr_init();
@@ -146,7 +141,6 @@ irongate_probe(device_t dev)
return ENXIO;
irongate0 = dev;
device_set_desc(dev, "AMD 751 Core Logic chipset");
- pci_init_resources();
isa_init_intr();
device_add_child(dev, "pcib", 0);
return 0;
diff --git a/sys/alpha/pci/irongate_pci.c b/sys/alpha/pci/irongate_pci.c
index 4950547..ab0c27b 100644
--- a/sys/alpha/pci/irongate_pci.c
+++ b/sys/alpha/pci/irongate_pci.c
@@ -40,6 +40,7 @@
#include <pci/pcireg.h>
#include <alpha/pci/irongatereg.h>
#include <alpha/pci/irongatevar.h>
+#include <alpha/pci/pcibus.h>
#include "alphapci_if.h"
#include "pcib_if.h"
@@ -54,6 +55,7 @@ irongate_pcib_probe(device_t dev)
device_set_desc(dev, "AMD 751 PCI host bus adapter");
+ pci_init_resources();
device_add_child(dev, "pci", 0);
/*
@@ -187,10 +189,10 @@ static device_method_t irongate_pcib_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, irongate_pcib_read_ivar),
- DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
- DEVMETHOD(bus_release_resource, bus_generic_release_resource),
- DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
- DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_alloc_resource, pci_alloc_resource),
+ DEVMETHOD(bus_release_resource, pci_release_resource),
+ DEVMETHOD(bus_activate_resource, pci_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/alpha/pci/lca.c b/sys/alpha/pci/lca.c
index 3b942f7..b1bfa15 100644
--- a/sys/alpha/pci/lca.c
+++ b/sys/alpha/pci/lca.c
@@ -38,10 +38,8 @@
#include <alpha/pci/lcareg.h>
#include <alpha/pci/lcavar.h>
-#include <alpha/pci/pcibus.h>
#include <alpha/isa/isavar.h>
#include <machine/intr.h>
-#include <machine/resource.h>
#include <machine/cpuconf.h>
#include <machine/swiz.h>
#include <machine/sgmap.h>
@@ -114,23 +112,12 @@ lca_write_hae(u_int64_t hae)
static int lca_probe(device_t dev);
static int lca_attach(device_t dev);
-static struct resource *lca_alloc_resource(device_t bus, device_t child,
- int type, int *rid, u_long start,
- u_long end, u_long count,
- u_int flags);
-static int lca_release_resource(device_t bus, device_t child,
- int type, int rid, struct resource *r);
-
static device_method_t lca_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, lca_probe),
DEVMETHOD(device_attach, lca_attach),
/* Bus interface */
- DEVMETHOD(bus_alloc_resource, lca_alloc_resource),
- DEVMETHOD(bus_release_resource, lca_release_resource),
- DEVMETHOD(bus_activate_resource, pci_activate_resource),
- DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, isa_setup_intr),
DEVMETHOD(bus_teardown_intr, isa_teardown_intr),
@@ -237,7 +224,6 @@ lca_probe(device_t dev)
lca0 = dev;
device_set_desc(dev, "21066 Core Logic chipset"); /* XXX */
- pci_init_resources();
isa_init_intr();
lca_init_sgmap();
@@ -264,26 +250,5 @@ lca_attach(device_t dev)
return 0;
}
-static struct resource *
-lca_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)
- return isa_alloc_intr(bus, child, start);
- else
- return pci_alloc_resource(bus, child, type, rid,
- start, end, count, flags);
-}
-
-static int
-lca_release_resource(device_t bus, device_t child, int type, int rid,
- struct resource *r)
-{
- if (type == SYS_RES_IRQ)
- return isa_release_intr(bus, child, r);
- else
- return pci_release_resource(bus, child, type, rid, r);
-}
-
DRIVER_MODULE(lca, root, lca_driver, lca_devclass, 0, 0);
diff --git a/sys/alpha/pci/lca_pci.c b/sys/alpha/pci/lca_pci.c
index f139b59a..70c873a 100644
--- a/sys/alpha/pci/lca_pci.c
+++ b/sys/alpha/pci/lca_pci.c
@@ -32,6 +32,7 @@
#include <sys/module.h>
#include <sys/bus.h>
#include <machine/bus.h>
+#include <machine/resource.h>
#include <sys/rman.h>
#include <pci/pcivar.h>
#include <machine/swiz.h>
@@ -39,6 +40,8 @@
#include <alpha/pci/lcareg.h>
#include <alpha/pci/lcavar.h>
+#include <alpha/pci/pcibus.h>
+#include <alpha/isa/isavar.h>
#include "alphapci_if.h"
#include "pcib_if.h"
@@ -52,6 +55,7 @@ lca_pcib_probe(device_t dev)
{
device_set_desc(dev, "21066 PCI host bus adapter");
+ pci_init_resources();
device_add_child(dev, "pci", 0);
return 0;
@@ -67,6 +71,27 @@ lca_pcib_read_ivar(device_t dev, device_t child, int which, u_long *result)
return ENOENT;
}
+static struct resource *
+lca_pcib_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)
+ return isa_alloc_intr(bus, child, start);
+ else
+ return pci_alloc_resource(bus, child, type, rid,
+ start, end, count, flags);
+}
+
+static int
+lca_pcib_release_resource(device_t bus, device_t child, int type, int rid,
+ struct resource *r)
+{
+ if (type == SYS_RES_IRQ)
+ return isa_release_intr(bus, child, r);
+ else
+ return pci_release_resource(bus, child, type, rid, r);
+}
+
static void *
lca_pcib_cvt_dense(device_t dev, vm_offset_t addr)
{
@@ -171,10 +196,10 @@ static device_method_t lca_pcib_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, lca_pcib_read_ivar),
- DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
- DEVMETHOD(bus_release_resource, bus_generic_release_resource),
- DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
- DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_alloc_resource, lca_pcib_alloc_resource),
+ DEVMETHOD(bus_release_resource, lca_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, pci_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/alpha/pci/t2.c b/sys/alpha/pci/t2.c
index 5a80b6e..05c0a0b 100644
--- a/sys/alpha/pci/t2.c
+++ b/sys/alpha/pci/t2.c
@@ -66,7 +66,6 @@
#include <alpha/pci/t2reg.h>
#include <alpha/pci/t2var.h>
-#include <alpha/pci/pcibus.h>
#include <alpha/isa/isavar.h>
#include <machine/intr.h>
#include <machine/resource.h>
@@ -165,10 +164,6 @@ static device_method_t t2_methods[] = {
DEVMETHOD(device_attach, t2_attach),
/* Bus interface */
- DEVMETHOD(bus_alloc_resource, pci_alloc_resource),
- DEVMETHOD(bus_release_resource, pci_release_resource),
- DEVMETHOD(bus_activate_resource, pci_activate_resource),
- DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, t2_setup_intr),
DEVMETHOD(bus_teardown_intr, t2_teardown_intr),
@@ -303,8 +298,8 @@ t2_init()
swiz_init_space_hae(&mem_space, KV(T2_PCI_SPARSE),
t2_set_hae_mem, 0);
- busspace_isa_io = (kobj_t) &io_space;
- busspace_isa_mem = (kobj_t) &mem_space;
+ busspace_isa_io = (struct alpha_busspace *) &io_space;
+ busspace_isa_mem = (struct alpha_busspace *) &mem_space;
chipset = t2_chipset;
@@ -350,8 +345,6 @@ t2_probe(device_t dev)
/* t2_num_hoses = 2; XXX not ready for this yet */
}
- pci_init_resources();
-
for (h = 0; h < t2_num_hoses; h++)
t2_csr_init(h);
diff --git a/sys/alpha/pci/t2_pci.c b/sys/alpha/pci/t2_pci.c
index cd0bf06..82a650b 100644
--- a/sys/alpha/pci/t2_pci.c
+++ b/sys/alpha/pci/t2_pci.c
@@ -39,6 +39,7 @@
#include <alpha/pci/t2reg.h>
#include <alpha/pci/t2var.h>
+#include <alpha/pci/pcibus.h>
#include "alphapci_if.h"
#include "pcib_if.h"
@@ -54,6 +55,8 @@ t2_pcib_probe(device_t dev)
device_set_desc(dev, "T2 PCI host bus adapter");
+ pci_init_resources();
+
child = device_add_child(dev, "pci", 0);
device_set_ivars(child, 0);
@@ -177,10 +180,10 @@ static device_method_t t2_pcib_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, t2_pcib_read_ivar),
- DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
- DEVMETHOD(bus_release_resource, bus_generic_release_resource),
- DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
- DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_alloc_resource, pci_alloc_resource),
+ DEVMETHOD(bus_release_resource, pci_release_resource),
+ DEVMETHOD(bus_activate_resource, pci_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/alpha/pci/tsunami.c b/sys/alpha/pci/tsunami.c
index feacfa2..3aac951 100644
--- a/sys/alpha/pci/tsunami.c
+++ b/sys/alpha/pci/tsunami.c
@@ -44,7 +44,6 @@
#include <alpha/isa/isavar.h>
#include <alpha/pci/tsunamireg.h>
#include <alpha/pci/tsunamivar.h>
-#include <alpha/pci/pcibus.h>
#include <machine/bwx.h>
#include <machine/intr.h>
#include <machine/intrcnt.h>
@@ -248,8 +247,8 @@ tsunami_init()
bwx_init_space(&io_space, KV(TSUNAMI_IO(0)));
bwx_init_space(&mem_space, KV(TSUNAMI_MEM(0)));
- busspace_isa_io = (kobj_t) &io_space;
- busspace_isa_mem = (kobj_t) &mem_space;
+ busspace_isa_io = (struct alpha_busspace *) &io_space;
+ busspace_isa_mem = (struct alpha_busspace *) &mem_space;
chipset = tsunami_chipset;
platform.pci_intr_enable = tsunami_intr_enable;
@@ -274,7 +273,6 @@ tsunami_probe(device_t dev)
else
tsunami_num_pchips = 1;
- pci_init_resources();
isa_init_intr();
for(i = 0; i < tsunami_num_pchips; i++) {
diff --git a/sys/alpha/pci/tsunami_pci.c b/sys/alpha/pci/tsunami_pci.c
index b77754a..495161c 100644
--- a/sys/alpha/pci/tsunami_pci.c
+++ b/sys/alpha/pci/tsunami_pci.c
@@ -63,6 +63,7 @@ tsunami_pcib_probe(device_t dev)
device_set_desc(dev, "21271 PCI host bus adapter");
+ pci_init_resources(); /* XXX probably don't need */
child = device_add_child(dev, "pci", -1);
bwx_init_space(&sc->io, KV(TSUNAMI_IO(device_get_unit(dev))));
@@ -89,8 +90,8 @@ tsunami_pcib_probe(device_t dev)
* isn't stictly necessary but it keeps things tidy.
*/
if (device_get_unit(dev) == 0) {
- busspace_isa_io = (kobj_t) &sc->io;
- busspace_isa_mem = (kobj_t) &sc->mem;
+ busspace_isa_io = (struct alpha_busspace *) &sc->io;
+ busspace_isa_mem = (struct alpha_busspace *) &sc->mem;
}
return 0;
OpenPOWER on IntegriCloud