Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga/dev Attach multifunction GVP boards.
details: https://anonhg.NetBSD.org/src/rev/3472bdcf5434
branches: trunk
changeset: 521284:3472bdcf5434
user: is <is%NetBSD.org@localhost>
date: Sun Jan 27 14:52:51 2002 +0000
description:
Attach multifunction GVP boards.
diffstat:
sys/arch/amiga/dev/gvpbus.c | 51 +++++++++++++++++++++++++-------------------
1 files changed, 29 insertions(+), 22 deletions(-)
diffs (113 lines):
diff -r 18c9d2be59db -r 3472bdcf5434 sys/arch/amiga/dev/gvpbus.c
--- a/sys/arch/amiga/dev/gvpbus.c Sun Jan 27 14:51:10 2002 +0000
+++ b/sys/arch/amiga/dev/gvpbus.c Sun Jan 27 14:52:51 2002 +0000
@@ -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 @@
{
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 @@
/* 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 @@
/*
* 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
Home |
Main Index |
Thread Index |
Old Index