diff options
author | Warner Losh <imp@FreeBSD.org> | 2001-05-21 07:32:46 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2001-05-21 07:32:46 +0000 |
commit | 13ab4e6dc1049dd0c2187938cb0509b3002a1e4d (patch) | |
tree | 343cf50cb3ac5378f5a571c93a110e22d71920c0 /sys/pccard/pcic_isa.c | |
parent | 2003c3f5309cefc3a0430731f6600b471601a3d9 (diff) | |
download | src-13ab4e6dc1049dd0c2187938cb0509b3002a1e4d.tar.gz src-13ab4e6dc1049dd0c2187938cb0509b3002a1e4d.zip |
Move allocation of ExCA registers from the base driver into the bus
attachment code.
Notes
Notes:
svn path=/head/; revision=76921
Diffstat (limited to 'sys/pccard/pcic_isa.c')
-rw-r--r-- | sys/pccard/pcic_isa.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/pccard/pcic_isa.c b/sys/pccard/pcic_isa.c index e5eb2052c68c..e69baba329d2 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)); } |