aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1998-08-25 22:46:44 +0000
committerWarner Losh <imp@FreeBSD.org>1998-08-25 22:46:44 +0000
commit6e73d499d84215a7b4a68999520eaef0ab3d9d10 (patch)
treeec7c7efcd10fbfaa0c0db22b045f032cbb67cc0a /sys
parent352ef9ec55a2155ae288d17ac8fdfcb50fa21202 (diff)
downloadsrc-6e73d499d84215a7b4a68999520eaef0ab3d9d10.tar.gz
src-6e73d499d84215a7b4a68999520eaef0ab3d9d10.zip
Add probing support for the vadem VG365 and the Vadem VG465 pcic chips.
We do the same thing we do with all the other Vadem chips and print the right identification for these chips. Tested with the 365, and inferred for the 465. This allows the cheapo PCMCIA card that I got from necx to print the right chip number on boot.
Notes
Notes: svn path=/head/; revision=38548
Diffstat (limited to 'sys')
-rw-r--r--sys/pccard/i82365.h14
-rw-r--r--sys/pccard/pcic.c36
2 files changed, 38 insertions, 12 deletions
diff --git a/sys/pccard/i82365.h b/sys/pccard/i82365.h
index b4575399196a..27b2b458c967 100644
--- a/sys/pccard/i82365.h
+++ b/sys/pccard/i82365.h
@@ -39,12 +39,14 @@
#define PCIC_PD672X 3 /* Cirrus logic 627x */
#define PCIC_PD6710 4 /* Cirrus logic 6710 */
#define PCIC_CL6729 5 /* Cirrus logic 6729 */
-#define PCIC_VG468 6 /* Vadem 468 */
-#define PCIC_VG469 7 /* Vadem 469 */
-#define PCIC_RF5C396 8 /* Ricoh RF5C396 */
-#define PCIC_IBM_KING 9 /* IBM KING PCMCIA Controller */
-#define PCIC_PC98 10 /* NEC PC98 PCMCIA Controller */
-#define PCIC_TI1130 11 /* TI PCI1130 CardBus */
+#define PCIC_VG365 6 /* Vadem 365 */
+#define PCIC_VG465 7 /* Vadem 465 */
+#define PCIC_VG468 8 /* Vadem 468 */
+#define PCIC_VG469 9 /* Vadem 469 */
+#define PCIC_RF5C396 10 /* Ricoh RF5C396 */
+#define PCIC_IBM_KING 11 /* IBM KING PCMCIA Controller */
+#define PCIC_PC98 12 /* NEC PC98 PCMCIA Controller */
+#define PCIC_TI1130 13 /* TI PCI1130 CardBus */
/*
* Address of the controllers. Each controller can manage
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index 6bfd48477019..1384c5b29b99 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -629,8 +629,20 @@ pcic_probe(void)
setb(sp, 0x3A, 0x40);
c = sp->getb(sp, PCIC_ID_REV);
if (c & 0x08) {
- sp->controller = ((sp->revision = c & 7) == 4) ?
- PCIC_VG469 : PCIC_VG468 ;
+ switch (sp->revision = c & 7) {
+ case 1:
+ sp->controller = PCIC_VG365;
+ break;
+ case 2:
+ sp->controller = PCIC_VG465;
+ break;
+ case 3:
+ sp->controller = PCIC_VG468;
+ break;
+ default:
+ sp->controller = PCIC_VG469;
+ break;
+ }
clrb(sp, 0x3A, 0x40);
}
@@ -693,6 +705,12 @@ pcic_probe(void)
case PCIC_PD6710:
cinfo.name = "Cirrus Logic PD6710";
break;
+ case PCIC_VG365:
+ cinfo.name = "Vadem 365";
+ break;
+ case PCIC_VG465:
+ cinfo.name = "Vadem 465";
+ break;
case PCIC_VG468:
cinfo.name = "Vadem 468";
break;
@@ -868,6 +886,8 @@ pcic_power(struct slot *slt)
#endif
case PCIC_PD672X:
case PCIC_PD6710:
+ case PCIC_VG365:
+ case PCIC_VG465:
case PCIC_VG468:
case PCIC_VG469:
case PCIC_RF5C396:
@@ -897,8 +917,10 @@ pcic_power(struct slot *slt)
break;
}
reg |= PCIC_VCC_3V;
- if ((sp->controller == PCIC_VG468)||
- (sp->controller == PCIC_VG469))
+ if ((sp->controller == PCIC_VG468) ||
+ (sp->controller == PCIC_VG469) ||
+ (sp->controller == PCIC_VG465) ||
+ (sp->controller == PCIC_VG365))
setb(sp, 0x2f, 0x03) ;
else
setb(sp, 0x16, 0x02);
@@ -909,8 +931,10 @@ pcic_power(struct slot *slt)
break;
}
reg |= PCIC_VCC_5V;
- if ((sp->controller == PCIC_VG468)||
- (sp->controller == PCIC_VG469))
+ if ((sp->controller == PCIC_VG468) ||
+ (sp->controller == PCIC_VG469) ||
+ (sp->controller == PCIC_VG465) ||
+ (sp->controller == PCIC_VG365))
clrb(sp, 0x2f, 0x03) ;
else
clrb(sp, 0x16, 0x02);