diff options
author | phk <phk@FreeBSD.org> | 1997-05-22 07:29:24 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-05-22 07:29:24 +0000 |
commit | 3de9539eca7a24c9899c6501b8b02d5ff191ff23 (patch) | |
tree | cee17a2247740ebf9e5cb44f307637a114f0a11a /sys/pccard/pcic.c | |
parent | 21035d6476d04b3b1f2522cbb8722fe0ab2de5b3 (diff) | |
download | FreeBSD-src-3de9539eca7a24c9899c6501b8b02d5ff191ff23.zip FreeBSD-src-3de9539eca7a24c9899c6501b8b02d5ff191ff23.tar.gz |
Don't apply 5V when we want 3.3V.
Kludge around the case where the PCIC refuses to use 5V because it knows
better than us.
Diffstat (limited to 'sys/pccard/pcic.c')
-rw-r--r-- | sys/pccard/pcic.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 6a8b156..b4f175f 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -948,7 +948,7 @@ pcic_power(struct slot *slotp) reg |= PCIC_VCC_5V_KING; break; } - reg |= PCIC_VCC_5V; + reg |= PCIC_VCC_3V; if ((sp->controller == PCIC_VG468)|| (sp->controller == PCIC_VG469)) setb(sp, 0x2f, 0x03) ; @@ -977,6 +977,14 @@ pcic_power(struct slot *slotp) sp->putb (sp, PCIC_POWER, reg); DELAY (100*1000); } + /* Some chips are smarter than us it seems, so if we weren't + * allowed to use 5V, try 3.3 instead + */ + if (!(sp->getb(sp, PCIC_STATUS) & 0x40) && slotp->pwr.vcc == 50) { + slotp->pwr.vcc = 33; + slotp->pwr.vpp = 0; + return (pcic_power(slotp)); + } return(0); } |