MFP4: Changes to hopefully make the new power code work better

o Rather than just try to turn off EXCA_INTR_RESET, set the entire register
  to 0.  This is slightly faster, and a better hammer.
o Move attempted clearing of the output enable (EXCA_PWRCTL_OE) back to
  after we turn off the power.  Modify it to write 0 so that we don't get
  Bad Vcc messages on TI bridges (untested, but ru@ sent me a similar patch)
  while at the same time avoiding interrupt storms on Ricoh bridges (tested
  by me on my Sony).

# Many of my observations of 'breakage' for this patch are due to some bug
# in the load/unload of cbb.ko unlreated to this change.  I'll be investigating
# and fixing that bug in the fullness of time.
This commit is contained in:
Warner Losh 2005-10-08 06:57:13 +00:00
parent f1abc0ea53
commit f481fa4d29

View file

@ -1269,13 +1269,13 @@ cbb_pcic_power_disable_socket(device_t brdev, device_t child)
DPRINTF(("cbb_pcic_socket_disable\n"));
/* reset signal asserting... */
exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET);
/* Turn off the card's interrupt and leave it in reset */
exca_putb(&sc->exca[0], EXCA_INTR, 0);
tsleep(sc, PZERO, "cbbP1", hz / 100);
/* power down the socket */
exca_clrb(&sc->exca[0], EXCA_PWRCTL, EXCA_PWRCTL_OE);
cbb_power(brdev, CARD_OFF);
exca_putb(&sc->exca[0], EXCA_PWRCTL, 0);
/* wait 300ms until power fails (Tpf). */
tsleep(sc, PZERO, "cbbP1", hz * 300 / 1000);