only one of the obio locators was actually used, so get rid of the others

and collapse the two variations of obio into one.  use the remaining locator
("addr") to differentiate the two possible esp and sbc devices (instead of
using the unit number).
This commit is contained in:
chs 2005-01-19 02:04:49 +00:00
parent a73e314137
commit e576d75b00
9 changed files with 65 additions and 64 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.150 2005/01/17 15:28:52 cube Exp $
# $NetBSD: GENERIC,v 1.151 2005/01/19 02:04:49 chs Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/mac68k/conf/std.mac68k"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.150 $"
#ident "GENERIC-$Revision: 1.151 $"
maxusers 16 # estimated number of users
@ -238,10 +238,10 @@ zstty* at zsc? channel ?
# SCSI controllers
# XXX - use only one of ncrscsi or sbc
ncrscsi0 at obio? # SCSI NCR 5380
#sbc0 at obio? flags 0x1 # MI SCSI NCR 5380
esp0 at obio? # SCSI NCR 53C9x
esp1 at obio? # SCSI NCR 53C9x
ncrscsi0 at obio? addr 0 # SCSI NCR 5380
#sbc0 at obio? addr 0 flags 0x1 # MI SCSI NCR 5380
esp0 at obio? addr 0 # SCSI NCR 53C9x
esp1 at obio? addr 1 # SCSI NCR 53C9x
# SCSI bus support
scsibus* at scsi?

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERICSBC,v 1.35 2005/01/17 15:28:52 cube Exp $
# $NetBSD: GENERICSBC,v 1.36 2005/01/19 02:04:49 chs Exp $
#
# GENERICSBC
@ -6,7 +6,7 @@ include "arch/mac68k/conf/std.mac68k"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERICSBC-$Revision: 1.35 $"
#ident "GENERICSBC-$Revision: 1.36 $"
maxusers 16 # estimated number of users
@ -217,10 +217,10 @@ zstty* at zsc? channel ?
# SCSI controllers
# XXX - use only one of ncrscsi or sbc
#ncrscsi0 at obio? # SCSI NCR 5380
sbc0 at obio? flags 0x1 # MI SCSI NCR 5380
esp0 at obio? # SCSI NCR 53C9x
esp1 at obio? # SCSI NCR 53C9x
#ncrscsi0 at obio? addr 0 # SCSI NCR 5380
sbc0 at obio? addr 0 flags 0x1 # MI SCSI NCR 5380
esp0 at obio? addr 0 # SCSI NCR 53C9x
esp1 at obio? addr 1 # SCSI NCR 53C9x
# SCSI bus support
scsibus* at scsi?

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.29 2004/11/10 17:54:05 christos Exp $
# $NetBSD: INSTALL,v 1.30 2005/01/19 02:04:49 chs Exp $
#
# INSTALL
@ -140,10 +140,10 @@ zstty* at zsc? channel ?
# SCSI controllers
# XXX - use only one of ncrscsi or sbc
ncrscsi0 at obio? # SCSI NCR 5380
#sbc0 at obio? flags 0x1 # MI SCSI NCR 5380
esp0 at obio? # SCSI NCR 53C9x
esp1 at obio? # SCSI NCR 53C9x
ncrscsi0 at obio? addr 0 # SCSI NCR 5380
#sbc0 at obio? addr 0 flags 0x1 # MI SCSI NCR 5380
esp0 at obio? addr 0 # SCSI NCR 53C9x
esp1 at obio? addr 1 # SCSI NCR 53C9x
# SCSI bus support
scsibus* at scsi?

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALLSBC,v 1.20 2004/11/10 17:54:05 christos Exp $
# $NetBSD: INSTALLSBC,v 1.21 2005/01/19 02:04:49 chs Exp $
#
# INSTALLSBC
@ -140,10 +140,10 @@ zstty* at zsc? channel ?
# SCSI controllers
# XXX - use only one of ncrscsi or sbc
#ncrscsi0 at obio? # SCSI NCR 5380
sbc0 at obio? flags 0x1 # MI SCSI NCR 5380
esp0 at obio? # SCSI NCR 53C9x
esp1 at obio? # SCSI NCR 53C9x
#ncrscsi0 at obio? addr 0 # SCSI NCR 5380
sbc0 at obio? addr 0 flags 0x1 # MI SCSI NCR 5380
esp0 at obio? addr 0 # SCSI NCR 53C9x
esp1 at obio? addr 1 # SCSI NCR 53C9x
# SCSI bus support
scsibus* at scsi?

View File

@ -1,4 +1,4 @@
# $NetBSD: SMALLRAM,v 1.12 2005/01/17 15:28:52 cube Exp $
# $NetBSD: SMALLRAM,v 1.13 2005/01/19 02:04:49 chs Exp $
#
# This is an example of how to configure a small, efficient kernel for a
# system with limited RAM. Even so it's capable of doing quite a bit. The
@ -13,7 +13,7 @@ include "arch/mac68k/conf/std.mac68k"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "SMALLRAM-$Revision: 1.12 $"
#ident "SMALLRAM-$Revision: 1.13 $"
maxusers 8
@ -211,10 +211,10 @@ zstty* at zsc? channel ?
# SCSI controllers
# XXX - use only one of ncrscsi or sbc
#ncrscsi0 at obio? # SCSI NCR 5380
sbc0 at obio? flags 0x1 # MI SCSI NCR 5380
#esp0 at obio? # SCSI NCR 53C9x
#esp1 at obio? # SCSI NCR 53C9x
#ncrscsi0 at obio? addr 0 # SCSI NCR 5380
sbc0 at obio? addr 0 flags 0x1 # MI SCSI NCR 5380
#esp0 at obio? addr 0 # SCSI NCR 53C9x
#esp1 at obio? addr 1 # SCSI NCR 53C9x
# SCSI bus support
scsibus* at scsi?

View File

@ -1,4 +1,4 @@
# $NetBSD: files.mac68k,v 1.113 2004/11/14 18:59:50 christos Exp $
# $NetBSD: files.mac68k,v 1.114 2005/01/19 02:04:49 chs Exp $
# mac68k-specific configuration info
@ -19,14 +19,12 @@ attach mainbus at root
include "dev/wscons/files.wscons"
define obio_norm { [addr = -1], ["no drq" = -1], ["no hsk" = -1] }
define obio_scsi5380 { [addr = -1], [drq = -1], [hsk = -1] }
device obio: obio_norm, obio_scsi5380
device obio { [addr = -1] }
attach obio at mainbus
file arch/mac68k/obio/obio.c obio
device adb { }
attach adb at obio_norm
attach adb at obio
file arch/mac68k/dev/adb.c adb
file arch/mac68k/dev/adbsysasm.s
file arch/mac68k/dev/adb_direct.c
@ -45,7 +43,7 @@ attach ams at adb
file arch/mac68k/dev/ams.c ams needs-flag
device asc
attach asc at obio_norm
attach asc at obio
file arch/mac68k/obio/asc.c asc needs-flag
device nubus { }
@ -56,7 +54,7 @@ define grfbus { }
file arch/mac68k/dev/grf_subr.c grfbus
device intvid: grfbus
attach intvid at obio_norm
attach intvid at obio
file arch/mac68k/obio/grf_obio.c intvid
device macvid: grfbus
@ -79,12 +77,12 @@ file arch/mac68k/nubus/if_ae_nubus.c ae_nubus
file arch/mac68k/dev/if_ae.c ae
device mc: ifnet, ether, arp
attach mc at obio_norm with mc_obio
attach mc at obio with mc_obio
file arch/mac68k/dev/if_mc.c mc
file arch/mac68k/obio/if_mc_obio.c mc_obio
device sn: ifnet, ether, arp
attach sn at obio_norm with sn_obio
attach sn at obio with sn_obio
attach sn at nubus with sn_nubus
file arch/mac68k/dev/if_sn.c sn
file arch/mac68k/obio/if_sn_obio.c sn_obio
@ -99,7 +97,7 @@ file arch/mac68k/nubus/if_netdock_nubus.c netdock_nubus
# Sony floppy disk controller
device iwm { drive = -1 }
attach iwm at obio_norm
attach iwm at obio
device fd: disk
attach fd at iwm
@ -110,16 +108,16 @@ include "dev/scsipi/files.scsipi"
# Option 1 for ncr5380 support
device ncrscsi: scsi
attach ncrscsi at obio_scsi5380
attach ncrscsi at obio
file arch/mac68k/dev/mac68k5380.c ncrscsi needs-flag
# Option 2 for ncr5380 support
device sbc: scsi, ncr5380sbc
attach sbc at obio_scsi5380 with sbc_obio
attach sbc at obio with sbc_obio
file arch/mac68k/dev/sbc.c sbc
file arch/mac68k/obio/sbc_obio.c sbc_obio
attach esp at obio_norm
attach esp at obio
file arch/mac68k/obio/esp.c esp
#device qsc: scsi, ncr53c9x
@ -131,11 +129,11 @@ file arch/mac68k/obio/esp.c esp
#
include "dev/ata/files.ata"
attach wdc at obio_norm with wdc_obio
attach wdc at obio with wdc_obio
file arch/mac68k/obio/wdc_obio.c wdc_obio
device zsc { channel = -1 }
attach zsc at obio_norm
attach zsc at obio
file arch/mac68k/dev/zs.c zsc needs-flag
#file arch/mac68k/dev/z8530sc.c zsc
file dev/ic/z8530sc.c zsc

View File

@ -1,4 +1,4 @@
/* $NetBSD: esp.c,v 1.37 2005/01/15 22:39:09 chs Exp $ */
/* $NetBSD: esp.c,v 1.38 2005/01/19 02:04:49 chs Exp $ */
/*
* Copyright (c) 1997 Jason R. Thorpe.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.37 2005/01/15 22:39:09 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.38 2005/01/19 02:04:49 chs Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -158,16 +158,15 @@ struct ncr53c9x_glue esp_glue = {
int
espmatch(struct device *parent, struct cfdata *cf, void *aux)
{
int found = 0;
struct obio_attach_args *oa = (struct obio_attach_args *)aux;
if ((cf->cf_unit == 0) && mac68k_machine.scsi96) {
found = 1;
if (oa->oa_addr == 0 && mac68k_machine.scsi96) {
return 1;
}
if ((cf->cf_unit == 1) && mac68k_machine.scsi96_2) {
found = 1;
if (oa->oa_addr == 1 && mac68k_machine.scsi96_2) {
return 1;
}
return found;
return 0;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: obio.c,v 1.19 2005/01/15 16:01:00 chs Exp $ */
/* $NetBSD: obio.c,v 1.20 2005/01/19 02:04:49 chs Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.19 2005/01/15 16:01:00 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.20 2005/01/19 02:04:49 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -96,7 +96,7 @@ obio_search(struct device *parent, struct cfdata *cf, void *aux)
struct mainbus_attach_args *mba = (struct mainbus_attach_args *) aux;
struct obio_attach_args oa;
oa.oa_addr = cf->cf_loc[OBIO_NORMCF_ADDR];
oa.oa_addr = cf->cf_loc[OBIOCF_ADDR];
oa.oa_tag = mba->mba_bst;
oa.oa_dmat = mba->mba_dmat;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbc_obio.c,v 1.18 2005/01/15 16:01:00 chs Exp $ */
/* $NetBSD: sbc_obio.c,v 1.19 2005/01/19 02:04:49 chs Exp $ */
/*
* Copyright (C) 1996,1997 Scott Reynolds. All rights reserved.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbc_obio.c,v 1.18 2005/01/15 16:01:00 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbc_obio.c,v 1.19 2005/01/19 02:04:49 chs Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -48,11 +48,14 @@ __KERNEL_RCSID(0, "$NetBSD: sbc_obio.c,v 1.18 2005/01/15 16:01:00 chs Exp $");
#include <dev/ic/ncr5380var.h>
#include <machine/cpu.h>
#include <machine/bus.h>
#include <machine/viareg.h>
#include <mac68k/dev/sbcreg.h>
#include <mac68k/dev/sbcvar.h>
#include <mac68k/obio/obiovar.h>
/*
* From Guide to the Macintosh Family Hardware, pp. 137-143
* These are offsets from SCSIBase (see pmap_bootstrap.c)
@ -82,33 +85,34 @@ CFATTACH_DECL(sbc_obio, sizeof(struct sbc_softc),
sbc_obio_match, sbc_obio_attach, NULL, NULL);
static int
sbc_obio_match(struct device *parent, struct cfdata *cf, void *args)
sbc_obio_match(struct device *parent, struct cfdata *cf, void *aux)
{
struct obio_attach_args *oa = (struct obio_attach_args *)aux;
switch (current_mac_model->machineid) {
case MACH_MACIIFX: /* Note: the IIfx isn't (yet) supported. */
/*
if (cf->cf_unit == 0)
if (oa->oa_addr == 0)
return 1;
*/
break;
case MACH_MACPB210:
case MACH_MACPB230:
case MACH_MACPB250:
case MACH_MACPB270:
case MACH_MACPB280:
case MACH_MACPB280C:
if (cf->cf_unit == 1)
if (oa->oa_addr == 1)
return 1;
/*FALLTHROUGH*/
default:
if (cf->cf_unit == 0 && mac68k_machine.scsi80)
if (oa->oa_addr == 0 && mac68k_machine.scsi80)
return 1;
}
return 0;
}
static void
sbc_obio_attach(struct device *parent, struct device *self, void *args)
sbc_obio_attach(struct device *parent, struct device *self, void *aux)
{
struct sbc_softc *sc = (struct sbc_softc *) self;
struct ncr5380_softc *ncr_sc = (struct ncr5380_softc *) sc;