Attach multifunction GVP boards.
This commit is contained in:
parent
5fea84442f
commit
4205fc1471
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: gvpbus.c,v 1.17 2002/01/26 13:40:56 aymeric Exp $ */
|
/* $NetBSD: gvpbus.c,v 1.18 2002/01/27 14:52:51 is Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 Christian E. Hopps
|
* Copyright (c) 1994 Christian E. Hopps
|
||||||
|
@ -70,10 +70,11 @@ gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||||
{
|
{
|
||||||
struct zbus_args *zap;
|
struct zbus_args *zap;
|
||||||
struct gvpbus_args ga;
|
struct gvpbus_args ga;
|
||||||
|
int flags0, flags;
|
||||||
|
|
||||||
zap = auxp;
|
zap = auxp;
|
||||||
bcopy(zap, &ga.zargs, sizeof(struct zbus_args));
|
bcopy(zap, &ga.zargs, sizeof(struct zbus_args));
|
||||||
ga.flags = 0;
|
flags = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* grab secondary type (or fake it if we have a series I)
|
* grab secondary type (or fake it if we have a series I)
|
||||||
|
@ -81,12 +82,12 @@ gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||||
if (zap->prodid != 9) {
|
if (zap->prodid != 9) {
|
||||||
ga.prod = *((u_char *)zap->va + 0x8001) & 0xf8;
|
ga.prod = *((u_char *)zap->va + 0x8001) & 0xf8;
|
||||||
if (*((u_char *)zap->va + 0x8001) & 0x01)
|
if (*((u_char *)zap->va + 0x8001) & 0x01)
|
||||||
ga.flags |= GVP_14MHZ;
|
flags |= GVP_14MHZ;
|
||||||
printf(": subprod %02x flags %02x", *((u_char *)zap->va + 0x8001), ga.flags);
|
printf(": subprod %02x flags %02x", *((u_char *)zap->va + 0x8001), flags);
|
||||||
#if 0
|
#if 0
|
||||||
} else {
|
} else {
|
||||||
ga.prod = GVP_SERIESII; /* really a series I */
|
ga.prod = GVP_SERIESII; /* really a series I */
|
||||||
ga.flags |= GVP_NOBANK;
|
flags |= GVP_NOBANK;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,39 +96,39 @@ gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||||
/* no scsi */
|
/* no scsi */
|
||||||
case GVP_GFORCE_040:
|
case GVP_GFORCE_040:
|
||||||
case GVP_GFORCE_030:
|
case GVP_GFORCE_030:
|
||||||
ga.flags = GVP_IO;
|
flags = GVP_IO;
|
||||||
/*FALLTHROUGH*/
|
/*FALLTHROUGH*/
|
||||||
case GVP_COMBO_R4:
|
case GVP_COMBO_R4:
|
||||||
case GVP_COMBO_R3:
|
case GVP_COMBO_R3:
|
||||||
ga.flags |= GVP_ACCEL;
|
flags |= GVP_ACCEL;
|
||||||
break;
|
break;
|
||||||
/* scsi */
|
/* scsi */
|
||||||
case GVP_A1291_SCSI:
|
case GVP_A1291_SCSI:
|
||||||
ga.flags |= GVP_SCSI | GVP_ACCEL;
|
flags |= GVP_SCSI | GVP_ACCEL;
|
||||||
sbic_no_dma = 1; /* Kludge !!!!!!! mlh */
|
sbic_no_dma = 1; /* Kludge !!!!!!! mlh */
|
||||||
break;
|
break;
|
||||||
case GVP_GFORCE_040_SCSI:
|
case GVP_GFORCE_040_SCSI:
|
||||||
ga.flags |= GVP_SCSI | GVP_IO | GVP_ACCEL;
|
flags |= GVP_SCSI | GVP_IO | GVP_ACCEL;
|
||||||
break;
|
break;
|
||||||
case GVP_GFORCE_030_SCSI:
|
case GVP_GFORCE_030_SCSI:
|
||||||
ga.flags |= GVP_SCSI | GVP_IO | GVP_ACCEL | GVP_25BITDMA;
|
flags |= GVP_SCSI | GVP_IO | GVP_ACCEL | GVP_25BITDMA;
|
||||||
break;
|
break;
|
||||||
case GVP_A530_SCSI:
|
case GVP_A530_SCSI:
|
||||||
case GVP_COMBO_R4_SCSI:
|
case GVP_COMBO_R4_SCSI:
|
||||||
ga.flags |= GVP_SCSI | GVP_ACCEL | GVP_25BITDMA;
|
flags |= GVP_SCSI | GVP_ACCEL | GVP_25BITDMA;
|
||||||
if (ga.prod == GVP_COMBO_R4_SCSI)
|
if (ga.prod == GVP_COMBO_R4_SCSI)
|
||||||
ga.flags ^= GVP_14MHZ;
|
flags ^= GVP_14MHZ;
|
||||||
break;
|
break;
|
||||||
case GVP_COMBO_R3_SCSI:
|
case GVP_COMBO_R3_SCSI:
|
||||||
ga.flags |= GVP_SCSI | GVP_ACCEL | GVP_24BITDMA;
|
flags |= GVP_SCSI | GVP_ACCEL | GVP_24BITDMA;
|
||||||
ga.flags ^= GVP_14MHZ;
|
flags ^= GVP_14MHZ;
|
||||||
break;
|
break;
|
||||||
case GVP_SERIESII:
|
case GVP_SERIESII:
|
||||||
ga.flags |= GVP_SCSI | GVP_24BITDMA;
|
flags |= GVP_SCSI | GVP_24BITDMA;
|
||||||
break;
|
break;
|
||||||
/* misc */
|
/* misc */
|
||||||
case GVP_IOEXTEND:
|
case GVP_IOEXTEND:
|
||||||
ga.flags |= GVP_IO;
|
flags |= GVP_IO;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf(": unknown Series II %x", ga.prod);
|
printf(": unknown Series II %x", ga.prod);
|
||||||
|
@ -136,11 +137,17 @@ gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||||
/*
|
/*
|
||||||
* attempt to configure the board.
|
* attempt to configure the board.
|
||||||
*/
|
*/
|
||||||
config_found(dp, &ga, gvpbusprint);
|
|
||||||
/*
|
flags0 = flags & ~(GVP_IO|GVP_SCSI);
|
||||||
* eventually when io support is added we need to
|
|
||||||
* configure that too.
|
if (flags & GVP_SCSI) {
|
||||||
*/
|
ga.flags = flags0 | GVP_SCSI;
|
||||||
|
config_found(dp, &ga, gvpbusprint);
|
||||||
|
}
|
||||||
|
if (flags & GVP_IO) {
|
||||||
|
ga.flags = flags0 | GVP_IO;
|
||||||
|
config_found(dp, &ga, gvpbusprint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue