From 0084fb021ba88d7f22b44035aebf97e625365f08 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 22 May 1997 07:29:24 +0000 Subject: [PATCH] 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. --- sys/pccard/pcic.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 6a8b1561819..b4f175fb38a 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); }