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.
This commit is contained in:
Warner Losh 1998-08-25 22:46:44 +00:00
parent 352ef9ec55
commit 6e73d499d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38548
2 changed files with 38 additions and 12 deletions

View File

@ -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

View File

@ -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);