summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-04-21 07:08:03 +0000
committerimp <imp@FreeBSD.org>2001-04-21 07:08:03 +0000
commit6d60ef027154ce5fe92b0a031f516005386dc20f (patch)
tree0a39c2ce128d7347a51dc82888d74b19e5be15b8 /sys/pccard/pcic.c
parentc1edcc0fe4978fbd8f63197f6224f7768d156adf (diff)
downloadFreeBSD-src-6d60ef027154ce5fe92b0a031f516005386dc20f.zip
FreeBSD-src-6d60ef027154ce5fe92b0a031f516005386dc20f.tar.gz
Set the device name for NEC PC98 PCMCIA Controller on boot.
# We really need to allocate i/o ports for it, but I need to learn # the pc98 bus space better before attempting that.
Diffstat (limited to 'sys/pccard/pcic.c')
-rw-r--r--sys/pccard/pcic.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index 809ba7d..5dff359 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -479,28 +479,29 @@ pcic_probe(device_t dev)
}
}
bus_release_resource(dev, SYS_RES_IOPORT, rid, r);
+ if (validslots != 0)
+ return (0);
#ifdef PC98
- if (validslots == 0) {
- sp = &pcic_slots[validunits * PCIC_CARD_SLOTS];
- if (inb(PCIC98_REG0) != 0xff) {
- sp->controller = PCIC_PC98;
- sp->revision = 0;
- cinfo.mapmem = pcic98_memory;
- cinfo.mapio = pcic98_io;
- cinfo.power = pcic98_power;
- cinfo.mapirq = pcic98_mapirq;
- cinfo.reset = pcic98_reset;
- cinfo.disable = pcic98_disable;
- cinfo.resume = pcic98_resume;
- cinfo.maxmem = 1;
+ sp = &pcic_slots[validunits * PCIC_CARD_SLOTS];
+ if (inb(PCIC98_REG0) != 0xff) {
+ sp->controller = PCIC_PC98;
+ sp->revision = 0;
+ cinfo.mapmem = pcic98_memory;
+ cinfo.mapio = pcic98_io;
+ cinfo.power = pcic98_power;
+ cinfo.mapirq = pcic98_mapirq;
+ cinfo.reset = pcic98_reset;
+ cinfo.disable = pcic98_disable;
+ cinfo.resume = pcic98_resume;
+ cinfo.maxmem = 1;
#if 0
- cinfo.maxio = 1;
+ cinfo.maxio = 1;
#else
- cinfo.maxio = 2; /* fake for UE2212 LAN card */
+ cinfo.maxio = 2; /* fake for UE2212 LAN card */
#endif
- validslots++;
- /* XXX Do I need to allocated the port resources? */
- }
+ validslots++;
+ /* XXX Do I need to allocated the port resources? */
+ device_set_desc(dev, "NEC PC98 Original PCMCIA Controller");
}
#endif /* PC98 */
return(validslots ? 0 : ENXIO);
OpenPOWER on IntegriCloud