From 1ab7d4c93d3dea8f6fe748079ec9e12161cc427c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 24 Mar 2006 07:52:00 +0000 Subject: For each of the voltages that a card might support, make sure that the socket also supports the voltage. Some XV cards have appeared on the scene (or cards that report they support XV), and in older machines that have sockets that do not support XV, we were bogusly trying to power them at XV rather than at 3.3V. Now, power up the card at the lowest voltage supported by both the card and the socket. MFC After: 3 days --- sys/dev/pccbb/pccbb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/pccbb') diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 8f6d06ad5783..9d51a790d3ce 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -715,13 +715,13 @@ cbb_detect_voltage(device_t brdev) psr = cbb_get(sc, CBB_SOCKET_STATE); - if (psr & CBB_STATE_5VCARD) + if (psr & CBB_STATE_5VCARD && psr & CBB_STATE_5VSOCK) vol |= CARD_5V_CARD; - if (psr & CBB_STATE_3VCARD) + if (psr & CBB_STATE_3VCARD && psr & CBB_STATE_3VSOCK) vol |= CARD_3V_CARD; - if (psr & CBB_STATE_XVCARD) + if (psr & CBB_STATE_XVCARD && psr & CBB_STATE_XVSOCK) vol |= CARD_XV_CARD; - if (psr & CBB_STATE_YVCARD) + if (psr & CBB_STATE_YVCARD && psr & CBB_STATE_YVSOCK) vol |= CARD_YV_CARD; return (vol); -- cgit v1.2.3