From owner-FreeBSD-users-jp@jp.FreeBSD.org Wed Jul 10 20:15:10 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g6ABFA064827;
	Wed, 10 Jul 2002 20:15:10 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from pop06.dreamnet.ne.jp (smtp6.dreamnet.ne.jp [202.217.109.117])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g6ABF9n64821
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Wed, 10 Jul 2002 20:15:09 +0900 (JST)
	(envelope-from chi@bd.mbn.or.jp)
Received: from chino.localhost ([210.143.149.124]) by pop06.dreamnet.ne.jp
          with ESMTP
          id <20020710111508.VFVO26513.pop06.dreamnet.ne.jp@chino.localhost>;
          Wed, 10 Jul 2002 20:15:08 +0900
Posted-Date: Wed, 10 Jul 2002 19:19:08 JST
To: FreeBSD-users-jp@jp.FreeBSD.org
Cc: bsd-nomads@clave.gr.jp
In-Reply-To: Your message of "Sat, 29 Jun 2002 20:29:25 +0900".
	<20020629112924.XNZA29574.pop13.dreamnet.ne.jp@chino.localhost>
From: chi@bd.mbn.or.jp (Chiharu Shibata)
X-Mailer: mnews [version 1.22] 1999-12/19(Sun)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-=-mnews-multipart-=-"
Message-Id: <20020710111508.VFVO26513.pop06.dreamnet.ne.jp@chino.localhost>
Date: Wed, 10 Jul 2002 20:15:09 +0900
Reply-To: FreeBSD-users-jp@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020710
X-Sequence: FreeBSD-users-jp 69824
Subject: [FreeBSD-users-jp 69824] Re: PD672x PCCard Controler in FreeBSD 4.6
Errors-To: owner-FreeBSD-users-jp@jp.FreeBSD.org
Sender: owner-FreeBSD-users-jp@jp.FreeBSD.org
X-Originator: chi@bd.mbn.or.jp


---=-mnews-multipart-=-
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

$B$3$s$K$A$O!"<FED$G$9!#(B
Sat, 29 Jun 2002 20:29:25 JST$B$K(B
$B;d$O=q$-$^$7$?!#(B

>[bsd-nomads:16302]/[FreeBSD-users-jp 68591]$B$G=q$$$?$h$&$K!"$I$&=$@5$9$k(B
>$B$N$,!VD>$9!W$3$H$K$J$k$+$OHs>o$KFq$7$$LdBj$G$9!#(B
>$B$^$?!"(Bsys/pccard/pcic.c$B$N(Bcommit log$B$K$O(B
>$B!V(B(6722$BEk:\$N(B)$BB?$/$N%^%7%s$O(B6729$BJ}<0$@$H%O%s%0$9$k!#$^$?!"(B6729$BJ}<0$GF0$/(B
>$B%^%7%s$O(B6710$BJ}<0$G$bF0$/!W(B
>$B$H=q$$$F$"$j$^$9$N$G!"3$30$N(BNOTE PC$B$@$H:#$N$^$^$N$[$&$,$h$$$+$bCN$l$^$;(B
>$B$s$7!#(B

CL-PD6722$B$N(BVSENSE$BJ}<0$r(Bkernel$B%Q%i%a!<%?$G@ZBX$($i$l$k$h$&$K$9$k%Q%C%A$r(B
$B:n$C$F$_$^$7$?$N$G!"$*;n$7$/$@$5$$!#(B

hw.pcic.6722_vsense
        0: VSENSE$B$r8+$J$$(B($B!A(B4.4-RELEASE$BAjEv(B)
        1: CL-PD6710$BJ}<0(B($B%G%U%)%k%H(B)
        2: CL-PD6729$BJ}<0(B
-- 
$B<FED(B $B@i=U(B($B!i(B) chi@bd.mbn.or.jp <http://plaza17.mbn.or.jp/~chi/>
---=-mnews-multipart-=-
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Description: pcic.c.diff
Content-Disposition: attachment; filename="pcic.c.diff"

--- sys/pccard/pcic.c	2002/07/07 12:47:15	1.1
+++ pcic.c	2002/07/07 13:04:50
@@ -95,6 +95,18 @@
     "Override the automatic powering up of pccards at boot.");
 
 /*
+ * CL-PD6722's VSENSE method
+ *     0: NO VSENSE
+ *     1: 6710's method(default)
+ *     2: 6729's method
+ */
+int pcic_6722_vsense = 1;
+TUNABLE_INT("hw.pcic.6722_vsense", &pcic_6722_vsense);
+SYSCTL_INT(_hw_pcic, OID_AUTO, 6722_vsense, CTLFLAG_RD,
+    &pcic_6722_vsense, 0,
+    "Select CL-PD6722's VSENSE method.");
+
+/*
  * Read a register from the PCIC.
  */
 unsigned char
@@ -607,14 +619,28 @@
 			 * the '22.  The laptops that don't work hang solid
 			 * when the pccard memory is accessed.
 			 */
-			switch (sp->controller) {
+			char controller = sp->controller;
+
+			if (controller == PCIC_PD6722) {
+				switch (pcic_6722_vsense) {
+				case 1:
+					controller = PCIC_PD6710;
+					break;
+				case 2:
+					controller = PCIC_PD6729;
+					break;
+				}
+			}
+
+			switch (controller) {
 			case PCIC_PD6710:
-			case PCIC_PD6722:
 				c = sp->getb(sp, PCIC_MISC1);
 				if ((c & PCIC_MISC1_5V_DETECT) == 0)
 					slt->pwr.vcc = 33;
 				else
 					slt->pwr.vcc = 50;
+				break;
+			case PCIC_PD6722:	/* with NO VENSE */
 				break;
 			case PCIC_PD6729:
 				/*

---=-mnews-multipart-=---

