summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-05-21 00:55:44 +0000
committerimp <imp@FreeBSD.org>2001-05-21 00:55:44 +0000
commit727acb940ed3fa054577255d16a476cbf3c0ab7f (patch)
tree4c60dfd1042b8c5e2b31b44f93f13e21e0cbadf7 /sys/pccard
parent6db2e67015f59e121b4f139c098b3b4efcd892db (diff)
downloadFreeBSD-src-727acb940ed3fa054577255d16a476cbf3c0ab7f.zip
FreeBSD-src-727acb940ed3fa054577255d16a476cbf3c0ab7f.tar.gz
Two comments and one bug fix:
o Add defines for the VS[12]# bits in register 0x16. o Add comment about what we're doing reading register 0x16 (PCIC_CDGC) in the DF case. o Check bit VS1# rather than a random bit I was checking due to a bogus transcrition on my part from nakagawa-san's article. o Add note about IBM KING and 3.3V operation from information larned from wildboard.
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/i82365.h2
-rw-r--r--sys/pccard/pcic.c16
2 files changed, 15 insertions, 3 deletions
diff --git a/sys/pccard/i82365.h b/sys/pccard/i82365.h
index 060eec5..d53aa69 100644
--- a/sys/pccard/i82365.h
+++ b/sys/pccard/i82365.h
@@ -207,6 +207,8 @@
#define PCIC_GPI_TRANS 0x08 /* GPI Transition Control */
#define PCIC_CDRES_EN 0x10 /* card detect resume enable */
#define PCIC_SW_CD_INT 0x20 /* s/w card detect interrupt */
+#define PCIC_VS1STAT 0x40 /* 0 VS1# low, 1 VS1# high */
+#define PCIC_VS2STAT 0x80 /* 0 VS2# low, 1 VS2# high */
/* CL-PD67[12]x: For 3.3V cards, etc. (PCIC_MISC1) */
#define PCIC_MISC1_5V_DETECT 0x01 /* PD6710 only */
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index 6a07b73..e3264dd 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -378,11 +378,13 @@ pcic_power(struct slot *slt)
switch(sp->controller) {
case PCIC_I82365SL_DF:
/*
- * Check to see if the power on bit is clear. If so, we're
- * using the wrong voltage and should try 3.3V instead.
+ * Look at the VS[12]# bits on the card. If VS1 is clear
+ * then we should apply 3.3 volts. Maybe we should do this
+ * with other cards too. Cirrus logic cards (PD67[12]*) do
+ * things like this in a different way.
*/
c = sp->getb(sp, PCIC_CDGC);
- if ((c & PCIC_POW) == 0)
+ if ((c & PCIC_VS1STAT) == 0)
slt->pwr.vcc = 33;
/* FALL THROUGH */
case PCIC_I82365:
@@ -413,6 +415,14 @@ pcic_power(struct slot *slt)
case 0:
break;
case 33:
+ /*
+ * The wildboar code has comments that state that
+ * the IBM KING controller doesn't support 3.3V
+ * on the "IBM Smart PC card drive". The code
+ * intemates that's the only place they have seen
+ * it used and that there's a boatload of issues
+ * with it.
+ */
if (sp->controller == PCIC_IBM_KING) {
reg |= PCIC_VCC_5V_KING;
break;
OpenPOWER on IntegriCloud