Clarify some of the 3.3V code with better comments. Also, since the

types are treated as a bitfield, test them as such.
This commit is contained in:
Warner Losh 2001-07-01 23:40:54 +00:00
parent 8ffbd9cfc5
commit c799054841

View File

@ -484,15 +484,18 @@ pcic_power(struct slot *slt)
if (sc->flags & PCIC_KING_POWER)
reg |= PCIC_VCC_5V_KING;
/*
* For either of the two variant power schemes for 3.3V
* go ahead and turn off the 3.3V magic. For all
* For all of the variant power schemes for 3.3V go
* ahead and turn off the 3.3V enable bit. For all
* bridges, the setting the Vcc on bit does the rest.
* Note that we don't have to turn off the 3.3V bit
* for the '365 step D since with the reg assigments
* to this point it doesn't get turned on.
*/
if (sc->flags & PCIC_VG_POWER)
pcic_clrb(sp, PCIC_CVSR, PCIC_CVSR_VS);
else if (sc->flags & PCIC_PD_POWER)
if (sc->flags & PCIC_PD_POWER)
pcic_clrb(sp, PCIC_MISC1, PCIC_MISC1_VCC_33);
else if (sc->flags & PCIC_RICOH_POWER)
if (sc->flags & PCIC_RICOH_POWER)
pcic_clrb(sp, PCIC_RICOH_MCR2, PCIC_MCR2_VCC_33);
break;
}
@ -505,8 +508,11 @@ pcic_power(struct slot *slt)
}
/*
* Some chips are smarter than us it seems, so if we weren't
* allowed to use 5V, try 3.3 instead
* Some chipsets will attempt to preclude us from supplying
* 5.0V to cards that only handle 3.3V. We seem to need to
* try 3.3V to paper over some power handling issues in other
* parts of the system. I suspect they are in the pccard bus
* driver, but may be in pccardd as well.
*/
if (!(sp->getb(sp, PCIC_STATUS) & PCIC_POW) && slt->pwr.vcc == 50) {
slt->pwr.vcc = 33;