[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bsd-nomads:16292] Re: RL5C475



Yoshihiko SARUMARUさんが書きました
:   すいません、そうですね。
:  ただそこはまだあんまり考えてなくて、あのパッチの bit を参照し
: ている部分は PD6729 からコピーしてきただけという状態です。
: それ以前に特定の bit が 0 ではなく816h レジスタのバイト値が 0
: (6, 7bitも0) なので、変だな、と思った次第です。

多分、このパッチ動きます。ISAのPCMCIA BridgeのReg1:Bit7は5V Card
Detectです。VS[12]#のためにPCIのCardBus BridgeはIntel DFのようであります。

# すみませんが、私はこのパッチをテストしませんでした。

ワーナー

Maybe this patch will work.  ISA PCMCIA Bridge's Register 1, bit 7 is
5V card detect.  However, the PCI CardBus bridges use Intel DF
registers for VS[12]# detection.

# I'm sorry, but I didn't test this patch.

Warner

Index: i82365.h
===================================================================
RCS file: /cache/ncvs/src/sys/pccard/i82365.h,v
retrieving revision 1.23
diff -u -r1.23 i82365.h
--- i82365.h	9 Nov 2001 07:33:54 -0000	1.23
+++ i82365.h	30 Apr 2002 05:14:04 -0000
@@ -118,7 +118,8 @@
 #define PCIC_IBM3	0x8a	/* IBM KING PCIC clone; Both Memory and I/O */
 
 /* For Interface Status register (PCIC_STATUS) */
-#define PCIC_VPPV	0x80	/* Vpp_valid */
+#define PCIC_VPPV	0x80	/* Vpp_valid or reserved*/
+#define PCIC_RICOH_5VCARD 0x80	/* 5V card detected */
 #define PCIC_POW	0x40	/* PC Card power active */
 #define PCIC_READY	0x20	/* Ready/~Busy */
 #define PCIC_MWP	0x10	/* Memory Write Protect */
Index: pcic.c
===================================================================
RCS file: /cache/ncvs/src/sys/pccard/pcic.c,v
retrieving revision 1.172
diff -u -r1.172 pcic.c
--- pcic.c	20 Mar 2002 19:02:08 -0000	1.172
+++ pcic.c	30 Apr 2002 05:20:44 -0000
@@ -668,6 +668,34 @@
 			 */
 			reg |= PCIC_APSENA;
 		}
+		if (sc->flags & PCIC_RICOH_POWER) {
+			switch (sp->controller) {
+			case PCIC_RF5C396:
+			case PCIC_RF5C296:
+				/*
+				 * The ISA bridge have the 5V/3.3V in register
+				 * 1, bit 7.
+				 */
+				c = sp->getb(sp, PCIC_STATUS);
+				if ((c & PCIC_RICOH_5VCARD) == 0)
+					slt->pwr.vcc = 33;
+				else
+					slt->pwr.vcc = 50;
+				break;
+			default:
+				/* 
+				 * Cardbus bridges have things the same as
+				 * the DF level parts, at least for VS[12]#
+				 * reporting.
+				 */
+				c = sp->getb(sp, PCIC_CDGC);
+				if ((c & PCIC_VS1STAT) == 0)
+					slt->pwr.vcc = 33;
+				else
+					slt->pwr.vcc = 50;
+				break;
+			}
+		}
 		/* Other bridges here */
 		if (bootverbose && slt->pwr.vcc != -1)
 			device_printf(sc->dev, "Autodetected %d.%dV card\n",