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
|
||||
@ -70,23 +70,24 @@ gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
{
|
||||
struct zbus_args *zap;
|
||||
struct gvpbus_args ga;
|
||||
int flags0, flags;
|
||||
|
||||
zap = auxp;
|
||||
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)
|
||||
*/
|
||||
if (zap->prodid != 9) {
|
||||
ga.prod = *((u_char *)zap->va + 0x8001) & 0xf8;
|
||||
if (*((u_char *)zap->va + 0x8001) & 0x01)
|
||||
ga.flags |= GVP_14MHZ;
|
||||
printf(": subprod %02x flags %02x", *((u_char *)zap->va + 0x8001), ga.flags);
|
||||
flags |= GVP_14MHZ;
|
||||
printf(": subprod %02x flags %02x", *((u_char *)zap->va + 0x8001), flags);
|
||||
#if 0
|
||||
} else {
|
||||
ga.prod = GVP_SERIESII; /* really a series I */
|
||||
ga.flags |= GVP_NOBANK;
|
||||
flags |= GVP_NOBANK;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -95,39 +96,39 @@ gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
/* no scsi */
|
||||
case GVP_GFORCE_040:
|
||||
case GVP_GFORCE_030:
|
||||
ga.flags = GVP_IO;
|
||||
flags = GVP_IO;
|
||||
/*FALLTHROUGH*/
|
||||
case GVP_COMBO_R4:
|
||||
case GVP_COMBO_R3:
|
||||
ga.flags |= GVP_ACCEL;
|
||||
flags |= GVP_ACCEL;
|
||||
break;
|
||||
/* scsi */
|
||||
case GVP_A1291_SCSI:
|
||||
ga.flags |= GVP_SCSI | GVP_ACCEL;
|
||||
flags |= GVP_SCSI | GVP_ACCEL;
|
||||
sbic_no_dma = 1; /* Kludge !!!!!!! mlh */
|
||||
break;
|
||||
case GVP_GFORCE_040_SCSI:
|
||||
ga.flags |= GVP_SCSI | GVP_IO | GVP_ACCEL;
|
||||
flags |= GVP_SCSI | GVP_IO | GVP_ACCEL;
|
||||
break;
|
||||
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;
|
||||
case GVP_A530_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)
|
||||
ga.flags ^= GVP_14MHZ;
|
||||
flags ^= GVP_14MHZ;
|
||||
break;
|
||||
case GVP_COMBO_R3_SCSI:
|
||||
ga.flags |= GVP_SCSI | GVP_ACCEL | GVP_24BITDMA;
|
||||
ga.flags ^= GVP_14MHZ;
|
||||
flags |= GVP_SCSI | GVP_ACCEL | GVP_24BITDMA;
|
||||
flags ^= GVP_14MHZ;
|
||||
break;
|
||||
case GVP_SERIESII:
|
||||
ga.flags |= GVP_SCSI | GVP_24BITDMA;
|
||||
flags |= GVP_SCSI | GVP_24BITDMA;
|
||||
break;
|
||||
/* misc */
|
||||
case GVP_IOEXTEND:
|
||||
ga.flags |= GVP_IO;
|
||||
flags |= GVP_IO;
|
||||
break;
|
||||
default:
|
||||
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.
|
||||
*/
|
||||
config_found(dp, &ga, gvpbusprint);
|
||||
/*
|
||||
* eventually when io support is added we need to
|
||||
* configure that too.
|
||||
*/
|
||||
|
||||
flags0 = flags & ~(GVP_IO|GVP_SCSI);
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user