summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic_isa.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-05-21 07:32:46 +0000
committerimp <imp@FreeBSD.org>2001-05-21 07:32:46 +0000
commitc65c10ec83e1ab12358a1571f7f75953c4dfe8ee (patch)
tree0fb53887ca5deed42ecae227e3b0ffafc6f33b0c /sys/pccard/pcic_isa.c
parentf7d282ea3828a1ca17113361093844bed305303c (diff)
downloadFreeBSD-src-c65c10ec83e1ab12358a1571f7f75953c4dfe8ee.zip
FreeBSD-src-c65c10ec83e1ab12358a1571f7f75953c4dfe8ee.tar.gz
Move allocation of ExCA registers from the base driver into the bus
attachment code.
Diffstat (limited to 'sys/pccard/pcic_isa.c')
-rw-r--r--sys/pccard/pcic_isa.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/pccard/pcic_isa.c b/sys/pccard/pcic_isa.c
index e5eb205..e69baba 100644
--- a/sys/pccard/pcic_isa.c
+++ b/sys/pccard/pcic_isa.c
@@ -286,9 +286,18 @@ static int
pcic_isa_attach(device_t dev)
{
struct pcic_softc *sc;
+ int rid;
+ struct resource *r;
sc = device_get_softc(dev);
- sc->flags |= PCIC_IO_MAPPED;
+ rid = 0;
+ r = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE);
+ if (!r) {
+ pcic_dealloc(dev);
+ return (ENXIO);
+ }
+ sc->iorid = rid;
+ sc->iores = r;
return (pcic_attach(dev));
}
OpenPOWER on IntegriCloud