summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2000-09-20 20:02:49 +0000
committerimp <imp@FreeBSD.org>2000-09-20 20:02:49 +0000
commitef70022f844efbe7329a5fe222fa0b475c9374cf (patch)
treee452b4f76729f165545134d00a187e75443eac58 /sys/pccard/pcic.c
parent67b1b035aaaf584d26a90553e435b9cb2f923e47 (diff)
downloadFreeBSD-src-ef70022f844efbe7329a5fe222fa0b475c9374cf.zip
FreeBSD-src-ef70022f844efbe7329a5fe222fa0b475c9374cf.tar.gz
o Remove 9 unnecessary includes.
o Add Vpp power at 5.0V rather than 0. Setting it to zero violates the pccard spec. Most pcic devices in use today don't let us violate the spec, but some older ones do. Bill Paul sent this to me a long time ago and I thought I'd commit it before now. o Add some debug stuff hidden behind bootverbose.
Diffstat (limited to 'sys/pccard/pcic.c')
-rw-r--r--sys/pccard/pcic.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index b16dbfa..6135e6f 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -41,9 +41,7 @@
#include <pccard/i82365.h>
#include <pccard/cardinfo.h>
-#include <pccard/driver.h>
#include <pccard/slot.h>
-#include <pccard/pcic.h>
/* Get pnp IDs */
#include <isa/isavar.h>
@@ -499,6 +497,7 @@ pcic_attach(device_t dev)
int error;
struct pcic_slot *sp;
int i;
+ int stat;
SET_UNIT(dev, validunits);
sp = &pcic_slots[GET_UNIT(dev) * PCIC_CARD_SLOTS];
@@ -552,7 +551,10 @@ pcic_attach(device_t dev)
setb(sp, PCIC_POWER, PCIC_PCPWRE| PCIC_DISRST);
if (sp->slt == NULL)
continue;
- if ((sp->getb(sp, PCIC_STATUS) & PCIC_CD) != PCIC_CD) {
+ stat = sp->getb(sp, PCIC_STATUS);
+ if (bootverbose)
+ printf("stat is %x\n", stat);
+ if ((stat & PCIC_CD) != PCIC_CD) {
sp->slt->laststate = sp->slt->state = empty;
} else {
sp->slt->laststate = sp->slt->state = filled;
@@ -772,6 +774,8 @@ pcicintr(void *arg)
s = splhigh();
for (slot = 0; slot < PCIC_CARD_SLOTS; slot++, sp++) {
if (sp->slt && (chg = sp->getb(sp, PCIC_STAT_CHG)) != 0) {
+ if (bootverbose)
+ printf("Slot %d chg = 0x%x\n", slot, chg);
if (chg & PCIC_CDTCH) {
if ((sp->getb(sp, PCIC_STATUS) & PCIC_CD) ==
PCIC_CD) {
OpenPOWER on IntegriCloud