summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1996-08-31 15:07:42 +0000
committerasami <asami@FreeBSD.org>1996-08-31 15:07:42 +0000
commitdb0af2c4dc8e05c93d178bf31653024d244398bb (patch)
tree1d4f9dd9983260d30deb95e70476dcd4ddd4bf3f
parentdaaa458ad4e4d56643147824f01dc948bdfae9e4 (diff)
downloadFreeBSD-src-db0af2c4dc8e05c93d178bf31653024d244398bb.zip
FreeBSD-src-db0af2c4dc8e05c93d178bf31653024d244398bb.tar.gz
s/pc98/isa/g in struct *_device and *_driver. Resync along the way.
Submitted by: The FreeBSD(98) Development Team
-rw-r--r--sys/conf/files.pc983
-rw-r--r--sys/kern/init_main.c3
-rw-r--r--sys/pc98/apm/apm.c22
-rw-r--r--sys/pc98/boot/biosboot/boot.c38
-rw-r--r--sys/pc98/boot/biosboot/sys.c6
-rw-r--r--sys/pc98/cbus/fdc.c35
-rw-r--r--sys/pc98/cbus/sio.c37
-rw-r--r--sys/pc98/conf/GENERIC11
-rw-r--r--sys/pc98/conf/GENERIC9811
-rw-r--r--sys/pc98/conf/files.pc983
-rw-r--r--sys/pc98/i386/userconfig.c73
-rw-r--r--sys/pc98/pc98/aic6360.c23
-rw-r--r--sys/pc98/pc98/fd.c35
-rw-r--r--sys/pc98/pc98/ft.c10
-rw-r--r--sys/pc98/pc98/if_ed.c308
-rw-r--r--sys/pc98/pc98/if_ed98.h4
-rw-r--r--sys/pc98/pc98/if_ep.c38
-rw-r--r--sys/pc98/pc98/if_fe.c10
-rw-r--r--sys/pc98/pc98/if_zp.c27
-rw-r--r--sys/pc98/pc98/lpt.c23
-rw-r--r--sys/pc98/pc98/matcd/matcd.c21
-rw-r--r--sys/pc98/pc98/mse.c31
-rw-r--r--sys/pc98/pc98/npx.c22
-rw-r--r--sys/pc98/pc98/pc98.c60
-rw-r--r--sys/pc98/pc98/pc98_device.h44
-rw-r--r--sys/pc98/pc98/pcaudio.c23
-rw-r--r--sys/pc98/pc98/sbic55.c12
-rw-r--r--sys/pc98/pc98/sbic55.c.new12
-rw-r--r--sys/pc98/pc98/scd.c20
-rw-r--r--sys/pc98/pc98/sio.c37
-rw-r--r--sys/pc98/pc98/sound/soundcard.c39
-rw-r--r--sys/pc98/pc98/syscons.c32
-rw-r--r--sys/pc98/pc98/wd.c21
33 files changed, 261 insertions, 833 deletions
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98
index 027b2a5..1e1168b 100644
--- a/sys/conf/files.pc98
+++ b/sys/conf/files.pc98
@@ -2,7 +2,7 @@
# files marked standard are always included.
#
# modified for PC-9801 after:
-# $Id: files.pc98,v 1.1.1.1 1996/06/14 10:04:40 asami Exp $
+# $Id: files.pc98,v 1.2 1996/07/23 07:45:49 asami Exp $
#
aic7xxx_asm optional ahc device-driver \
dependency "$S/dev/aic7xxx/aic7xxx_asm.c" \
@@ -41,6 +41,7 @@ i386/i386/cons.c standard
i386/i386/db_disasm.c optional ddb
i386/i386/db_interface.c optional ddb
i386/i386/db_trace.c optional ddb
+i386/i386/i386-gdbstub.c optional ddb
pc98/i386/exception.s standard
i386/i386/identcpu.c standard
i386/i386/in_cksum.c optional inet
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 885ad06..8346657 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
- * $Id: init_main.c,v 1.45 1996/08/22 17:37:02 wosch Exp $
+ * $Id: init_main.c,v 1.46 1996/08/28 18:32:51 bde Exp $
*/
#include "opt_rlimit.h"
@@ -267,6 +267,7 @@ char copyright[] =
"Copyright (c) 1982, 1986, 1989, 1991, 1993\n\tThe Regents of the University of California.\nCopyright (c) 1992 Hewlett-Packard Company\nCopyright (c) 1992 Motorola Inc.\nAll rights reserved.\n\n";
#else
char copyright[] =
+"Copyright (c) 1992-1996 FreeBSD Inc.\n"
#ifdef PC98
"Copyright (c) 1994-1996 FreeBSD(98) porting team.\n"
"Copyright (c) 1982, 1986, 1989, 1991, 1993\n\tThe Regents of the University of California.\n"
diff --git a/sys/pc98/apm/apm.c b/sys/pc98/apm/apm.c
index 482eefb..008282d 100644
--- a/sys/pc98/apm/apm.c
+++ b/sys/pc98/apm/apm.c
@@ -14,7 +14,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.1.1.1 1996/06/14 10:04:36 asami Exp $
+ * $Id: apm.c,v 1.2 1996/07/23 07:45:29 asami Exp $
*/
#include "apm.h"
@@ -36,9 +36,9 @@
#include <sys/proc.h>
#include <sys/vnode.h>
#ifdef PC98
-#include "pc98/pc98/pc98_device.h"
+#include <pc98/pc98/pc98_device.h>
#else
-#include "i386/isa/isa_device.h"
+#include <i386/isa/isa_device.h>
#endif
#include <machine/apm_bios.h>
#include <machine/segments.h>
@@ -48,7 +48,7 @@
#include <vm/pmap.h>
#include <sys/syslog.h>
#include <sys/devconf.h>
-#include "apm_setup.h"
+#include <i386/apm/apm_setup.h>
static int apm_display_off __P((void));
static int apm_int __P((u_long *eax, u_long *ebx, u_long *ecx));
@@ -585,15 +585,9 @@ apm_not_halt_cpu(struct apm_softc *sc)
}
/* device driver definitions */
-#ifdef PC98
-static int apmprobe (struct pc98_device *);
-static int apmattach(struct pc98_device *);
-struct pc98_driver apmdriver = {
-#else
static int apmprobe (struct isa_device *);
static int apmattach(struct isa_device *);
struct isa_driver apmdriver = {
-#endif
apmprobe, apmattach, "apm" };
/*
@@ -606,11 +600,7 @@ struct isa_driver apmdriver = {
*/
static int
-#ifdef PC98
-apmprobe(struct pc98_device *dvp)
-#else
apmprobe(struct isa_device *dvp)
-#endif
{
if ( dvp->id_unit > 0 ) {
printf("apm: Only one APM driver supported.\n");
@@ -697,11 +687,7 @@ apm_processevent(struct apm_softc *sc)
*/
static int
-#ifdef PC98
-apmattach(struct pc98_device *dvp)
-#else
apmattach(struct isa_device *dvp)
-#endif
{
#define APM_KERNBASE KERNBASE
struct apm_softc *sc = &apm_softc;
diff --git a/sys/pc98/boot/biosboot/boot.c b/sys/pc98/boot/biosboot/boot.c
index 57756ba..924ca54 100644
--- a/sys/pc98/boot/biosboot/boot.c
+++ b/sys/pc98/boot/biosboot/boot.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, [92/04/03 16:51:14 rvb]
- * $Id: boot.c,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
+ * $Id: boot.c,v 1.2 1996/07/23 07:45:35 asami Exp $
*/
@@ -163,7 +163,7 @@ loadstart:
/* print this all each time.. (saves space to do so) */
/* If we have looped, use the previous entries as defaults */
printf("\n>> FreeBSD BOOT @ 0x%x: %d/%d k of memory\n"
- "Usage: [[[%d:][%s](%d,a)]%s][-abcCdhrsv]\n"
+ "Usage: [[[%d:][%s](%d,a)]%s][-abcCdghrsv]\n"
"Use 1:sd(0,a)kernel to boot sd0 if it is BIOS drive 1\n"
"Use ? for file list or press Enter for defaults\n\nBoot: ",
ouraddr, bootinfo.bi_basemem, bootinfo.bi_extmem,
@@ -305,38 +305,6 @@ loadprog(void)
bootinfo.bi_esymtab = addr;
-#ifdef notyet
-#ifdef PC98
- /*
- * MO boot support by KATO Takenori (Nov 27, 1995)
- *
- * Major device number should be cahnged into 20 (od) from
- * 4 (sd) when you boot from MO.
- */
- if (maj == 4) {
- /* SCSI device*/
- if (((*(unsigned char*)0x11482) & (1 << unit)) == 0) {
- /*
- * XXX
- * Boot device is not HDD
- */
- int scsi_id;
- unit = 0;
- /*
- * XXX
- * If you want to boot from MO, its ID should be below
- * than that of other SCSI devices except for HDD becaus
- * they seem to be a MO in following code.
- */
- for (scsi_id = 0; scsi_id < unit; scsi_id++)
- if ((*(unsigned char*)0x11482) & (1 << scsi_id) == 0)
- unit++;
- }
- maj = 20; /* od */
- }
-#endif
-#endif
-
/*
* For backwards compatibility, use the previously-unused adaptor
* and controller bitfields to hold the slice number.
@@ -390,6 +358,8 @@ nextarg:
if (*howto & RB_SERIAL)
init_serial();
}
+ if (c == 'g')
+ *howto |= RB_GDB;
if (c == 'r')
*howto |= RB_DFLTROOT;
if (c == 's')
diff --git a/sys/pc98/boot/biosboot/sys.c b/sys/pc98/boot/biosboot/sys.c
index dcf96ba..795b2c2 100644
--- a/sys/pc98/boot/biosboot/sys.c
+++ b/sys/pc98/boot/biosboot/sys.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:34 rpd
- * $Id: sys.c,v 1.11 1996/04/07 14:28:03 bde Exp $
+ * $Id: sys.c,v 1.1.1.1 1996/06/14 10:04:37 asami Exp $
*/
/*
@@ -248,9 +248,9 @@ openrd(void)
#ifdef PC98
dosdev = unit | 0xa0;
disk_equips = *(unsigned char *)0x11482;
+ unit = 0;
for (i = 0; i < unit; i++)
- sdunit += ((disk_equips >> i) & 0x01);
- unit = sdunit;
+ unit += ((disk_equips >> i) & 0x01);
#else /* IBM-PC */
dosdev = biosdrive | 0x80;
#endif
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index 1295b3e..c4ec6ff 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.2 1996/07/23 07:46:11 asami Exp $
+ * $Id: fd.c,v 1.3 1996/07/30 18:55:58 asami Exp $
*
*/
@@ -144,11 +144,7 @@ fd_registerdev(int ctlr, int unit)
}
static inline void
-#ifdef PC98
-fdc_registerdev(struct pc98_device *dvp)
-#else
fdc_registerdev(struct isa_device *dvp)
-#endif
{
int unit = dvp->id_unit;
@@ -378,21 +374,12 @@ void ftstrategy(struct buf *);
int ftioctl(dev_t, int, caddr_t, int, struct proc *);
int ftdump(dev_t);
int ftsize(dev_t);
-#ifdef PC98
-int ftattach(struct pc98_device *, struct pc98_device *, int);
-#else
int ftattach(struct isa_device *, struct isa_device *, int);
#endif
-#endif
/* autoconfig functions */
-#ifdef PC98
-static int fdprobe(struct pc98_device *);
-static int fdattach(struct pc98_device *);
-#else
static int fdprobe(struct isa_device *);
static int fdattach(struct isa_device *);
-#endif
/* needed for ft driver, thus exported */
int in_fdc(fdcu_t);
@@ -455,11 +442,7 @@ static int volatile fd_debug = 0;
#endif /* DEBUG */
/* autoconfig structure */
-#ifdef PC98
-struct pc98_driver fdcdriver = {
-#else
struct isa_driver fdcdriver = {
-#endif
fdprobe, fdattach, "fdc",
};
@@ -476,11 +459,7 @@ static struct bdevsw fd_bdevsw =
nodump, nopsize, 0, "fd", &fd_cdevsw, -1 };
-#ifdef PC98
-static struct pc98_device *fdcdevs[NFDC];
-#else
static struct isa_device *fdcdevs[NFDC];
-#endif
/*
* Provide hw.devconf information.
@@ -721,11 +700,7 @@ static int pc98_fd_check_ready(fdu)
* probe for existance of controller
*/
static int
-#ifdef PC98
-fdprobe(struct pc98_device *dev)
-#else
fdprobe(struct isa_device *dev)
-#endif
{
fdcu_t fdcu = dev->id_unit;
if(fdc_data[fdcu].flags & FDC_ATTACHED)
@@ -769,11 +744,7 @@ fdprobe(struct isa_device *dev)
* wire controller into system, look for floppy units
*/
static int
-#ifdef PC98
-fdattach(struct pc98_device *dev)
-#else
fdattach(struct isa_device *dev)
-#endif
{
unsigned fdt;
fdu_t fdu;
@@ -784,11 +755,7 @@ fdattach(struct isa_device *dev)
#if NFT > 0
int unithasfd;
#endif
-#ifdef PC98
- struct pc98_device *fdup;
-#else
struct isa_device *fdup;
-#endif
int ic_type = 0;
#ifdef DEVFS
int mynor;
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 66a8d71..461a4e6 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
+ * $Id: sio.c,v 1.2 1996/07/23 07:46:38 asami Exp $
*/
#include "opt_comconsole.h"
@@ -375,31 +375,18 @@ void siopoll __P((void));
#define siommap nommap
#define siostrategy nostrategy
-#ifdef PC98
-#ifdef COM_ESP
-static int espattach __P((struct pc98_device *isdp, struct com_s *com,
- Port_t esp_port));
-#endif
-static int sioattach __P((struct pc98_device *dev));
-#else
#ifdef COM_ESP
static int espattach __P((struct isa_device *isdp, struct com_s *com,
Port_t esp_port));
#endif
static int sioattach __P((struct isa_device *dev));
-#endif
static timeout_t siodtrwakeup;
static void comhardclose __P((struct com_s *com));
static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
-#ifdef PC98
-static int sioprobe __P((struct pc98_device *dev));
-static void sioregisterdev __P((struct pc98_device *id));
-#else
static int sioprobe __P((struct isa_device *dev));
static void sioregisterdev __P((struct isa_device *id));
-#endif
static void siosettimeout __P((void));
static void comstart __P((struct tty *tp));
static timeout_t comwakeup;
@@ -417,11 +404,7 @@ static char driver_name[] = "sio";
static struct com_s *p_com_addr[NSIO];
#define com_addr(unit) (p_com_addr[unit])
-#ifdef PC98
-struct pc98_driver siodriver = {
-#else
struct isa_driver siodriver = {
-#endif
sioprobe, sioattach, driver_name
};
@@ -757,11 +740,7 @@ card_intr(struct pccard_dev *dp)
static void
sioregisterdev(id)
-#ifdef PC98
- struct pc98_device *id;
-#else
struct isa_device *id;
-#endif
{
int unit;
@@ -790,25 +769,17 @@ sioregisterdev(id)
static int
sioprobe(dev)
-#ifdef PC98
- struct pc98_device *dev;
-#else
struct isa_device *dev;
-#endif
{
static bool_t already_init;
bool_t failures[10];
int fn;
-#ifdef PC98
- struct pc98_device *idev;
-#else
struct isa_device *idev;
-#endif
Port_t iobase;
u_char mcr_image;
int result;
#ifdef PC98
- struct pc98_device *xdev;
+ struct isa_device *xdev;
int irqout=0;
int ret = 0;
int tmp;
@@ -1150,11 +1121,7 @@ espattach(isdp, com, esp_port)
static int
sioattach(isdp)
-#ifdef PC98
- struct pc98_device *isdp;
-#else
struct isa_device *isdp;
-#endif
{
struct com_s *com;
dev_t dev;
diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC
index 8b2ae65..2664e5d 100644
--- a/sys/pc98/conf/GENERIC
+++ b/sys/pc98/conf/GENERIC
@@ -1,8 +1,17 @@
#
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
#
-# $Id: GENERIC98,v 1.1.1.1 1996/06/14 10:04:40 asami Exp $
+# For more information read the handbook part System Administration ->
+# Configuring the FreeBSD Kernel -> The Configuration File.
+# The handbook is available in /usr/share/doc/handbook or online as
+# latest version from the FreeBSD World Wide Web server
+# <URL:http://www.FreeBSD.ORG/>
#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is present in the ./LINT configuration file. If you are
+# in doubt as to the purpose or necessity of a line, check first in LINT.
+#
+# $Id: GENERIC,v 1.75 1996/08/27 16:25:53 wosch Exp $
# GENERIC98 -- Generic PC98 machine with WD/SBIC55 disks
diff --git a/sys/pc98/conf/GENERIC98 b/sys/pc98/conf/GENERIC98
index 8b2ae65..2664e5d 100644
--- a/sys/pc98/conf/GENERIC98
+++ b/sys/pc98/conf/GENERIC98
@@ -1,8 +1,17 @@
#
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
#
-# $Id: GENERIC98,v 1.1.1.1 1996/06/14 10:04:40 asami Exp $
+# For more information read the handbook part System Administration ->
+# Configuring the FreeBSD Kernel -> The Configuration File.
+# The handbook is available in /usr/share/doc/handbook or online as
+# latest version from the FreeBSD World Wide Web server
+# <URL:http://www.FreeBSD.ORG/>
#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is present in the ./LINT configuration file. If you are
+# in doubt as to the purpose or necessity of a line, check first in LINT.
+#
+# $Id: GENERIC,v 1.75 1996/08/27 16:25:53 wosch Exp $
# GENERIC98 -- Generic PC98 machine with WD/SBIC55 disks
diff --git a/sys/pc98/conf/files.pc98 b/sys/pc98/conf/files.pc98
index 027b2a5..1e1168b 100644
--- a/sys/pc98/conf/files.pc98
+++ b/sys/pc98/conf/files.pc98
@@ -2,7 +2,7 @@
# files marked standard are always included.
#
# modified for PC-9801 after:
-# $Id: files.pc98,v 1.1.1.1 1996/06/14 10:04:40 asami Exp $
+# $Id: files.pc98,v 1.2 1996/07/23 07:45:49 asami Exp $
#
aic7xxx_asm optional ahc device-driver \
dependency "$S/dev/aic7xxx/aic7xxx_asm.c" \
@@ -41,6 +41,7 @@ i386/i386/cons.c standard
i386/i386/db_disasm.c optional ddb
i386/i386/db_interface.c optional ddb
i386/i386/db_trace.c optional ddb
+i386/i386/i386-gdbstub.c optional ddb
pc98/i386/exception.s standard
i386/i386/identcpu.c standard
i386/i386/in_cksum.c optional inet
diff --git a/sys/pc98/i386/userconfig.c b/sys/pc98/i386/userconfig.c
index 8533de4..f3ba327 100644
--- a/sys/pc98/i386/userconfig.c
+++ b/sys/pc98/i386/userconfig.c
@@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
- ** $Id: userconfig.c,v 1.1.1.1 1996/06/14 10:04:41 asami Exp $
+ ** $Id: userconfig.c,v 1.2 1996/08/30 10:42:55 asami Exp $
**/
/**
@@ -127,10 +127,10 @@
#include <pci/pcivar.h>
#ifdef PC98
-static struct pc98_device *devtabs[] = { pc98_devtab_bio, pc98_devtab_tty, pc98_devtab_net,
+static struct isa_device *devtabs[] = { pc98_devtab_bio, pc98_devtab_tty, pc98_devtab_net,
pc98_devtab_null, NULL };
-static struct pc98_device *isa_devlist; /* list read by dset to extract changes */
+static struct isa_device *isa_devlist; /* list read by dset to extract changes */
#else
static struct isa_device *devtabs[] = { isa_devtab_bio, isa_devtab_tty, isa_devtab_net,
isa_devtab_null, NULL };
@@ -321,11 +321,7 @@ typedef struct _devlist_struct
int comment; /* 0 = device, 1 = comment, 2 = collapsed comment */
int conflicts; /* set/reset by findconflict, count of conflicts */
int changed; /* nonzero if the device has been edited */
-#ifdef PC98
- struct pc98_device *device;
-#else
struct isa_device *device;
-#endif
struct _devlist_struct *prev,*next;
} DEV_LIST;
@@ -401,11 +397,7 @@ static void
getdevs(void)
{
int i,j;
-#ifdef PC98
- struct pc98_device *ap;
-#else
struct isa_device *ap;
-#endif
for (j = 0; devtabs[j]; j++) /* ISA devices */
{
@@ -680,11 +672,7 @@ initlist(DEV_LIST **list)
static void
savelist(DEV_LIST *list, int active)
{
-#ifdef PC98
- struct pc98_device *id_p,*id_pn;
-#else
struct isa_device *id_p,*id_pn;
-#endif
while (list)
{
@@ -698,24 +686,15 @@ savelist(DEV_LIST *list, int active)
if (id_p->id_id == list->device->id_id)
{
id_pn = id_p->id_next;
-#ifdef PC98
- bcopy(list->device,id_p,sizeof(struct pc98_device));
-#else
bcopy(list->device,id_p,sizeof(struct isa_device));
-#endif
id_p->id_next = id_pn;
break;
}
}
if (!id_pn) /* not already on the list */
{
-#ifdef PC98
- id_pn = malloc(sizeof(struct pc98_device),M_DEVL,M_WAITOK);
- bcopy(list->device,id_pn,sizeof(struct pc98_device));
-#else
id_pn = malloc(sizeof(struct isa_device),M_DEVL,M_WAITOK);
bcopy(list->device,id_pn,sizeof(struct isa_device));
-#endif
id_pn->id_next = isa_devlist;
isa_devlist = id_pn; /* park at top of list */
}
@@ -2226,7 +2205,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: userconfig.c,v 1.1.1.1 1996/06/14 10:04:41 asami Exp $
+ * $Id: userconfig.c,v 1.2 1996/08/30 10:42:55 asami Exp $
*/
#include "scbus.h"
@@ -2240,11 +2219,7 @@ visuserconfig(void)
typedef struct _cmdparm {
int type;
union {
-#ifdef PC98
- struct pc98_device *dparm;
-#else
struct isa_device *dparm;
-#endif
int iparm;
void *aparm;
} parm;
@@ -2264,24 +2239,14 @@ static void lsscsi(void);
static int list_scsi(CmdParm *);
#endif
-#ifdef PC98
-static void lsdevtab(struct pc98_device *);
-static struct pc98_device *find_device(char *, int);
-static struct pc98_device *search_devtable(struct pc98_device *, char *, int);
-#else
static void lsdevtab(struct isa_device *);
static struct isa_device *find_device(char *, int);
static struct isa_device *search_devtable(struct isa_device *, char *, int);
-#endif
static void cngets(char *, int);
static Cmd *parse_cmd(char *);
static int parse_args(char *, CmdParm *);
static unsigned long strtoul(const char *, char **, int);
-#ifdef PC98
-static int save_dev(struct pc98_device *);
-#else
static int save_dev(struct isa_device *);
-#endif
static int list_devices(CmdParm *);
static int set_device_ioaddr(CmdParm *);
@@ -2589,11 +2554,7 @@ helpfunc(CmdParm *parms)
}
static void
-#ifdef PC98
-lsdevtab(struct pc98_device *dt)
-#else
lsdevtab(struct isa_device *dt)
-#endif
{
for (; dt->id_id != 0; dt++) {
int i;
@@ -2639,10 +2600,10 @@ lsdevtab(struct isa_device *dt)
}
#ifdef PC98
-static struct pc98_device *
+static struct isa_device *
find_device(char *devname, int unit)
{
- struct pc98_device *ret;
+ struct isa_device *ret;
if ((ret = search_devtable(&pc98_devtab_bio[0], devname, unit)) != NULL)
return ret;
@@ -2672,13 +2633,8 @@ find_device(char *devname, int unit)
}
#endif
-#ifdef PC98
-static struct pc98_device *
-search_devtable(struct pc98_device *dt, char *devname, int unit)
-#else
static struct isa_device *
search_devtable(struct isa_device *dt, char *devname, int unit)
-#endif
{
int i;
@@ -2882,39 +2838,22 @@ list_scsi(CmdParm *parms)
static int
save_dev(idev)
-#ifdef PC98
-struct pc98_device *idev;
-#else
struct isa_device *idev;
-#endif
{
-#ifdef PC98
- struct pc98_device *id_p,*id_pn;
-#else
struct isa_device *id_p,*id_pn;
-#endif
for (id_p=isa_devlist;
id_p;
id_p=id_p->id_next) {
if (id_p->id_id == idev->id_id) {
id_pn = id_p->id_next;
-#ifdef PC98
- bcopy(idev,id_p,sizeof(struct pc98_device));
-#else
bcopy(idev,id_p,sizeof(struct isa_device));
-#endif
id_p->id_next = id_pn;
return 1;
}
}
-#ifdef PC98
- id_pn = malloc(sizeof(struct pc98_device),M_DEVL,M_WAITOK);
- bcopy(idev,id_pn,sizeof(struct pc98_device));
-#else
id_pn = malloc(sizeof(struct isa_device),M_DEVL,M_WAITOK);
bcopy(idev,id_pn,sizeof(struct isa_device));
-#endif
id_pn->id_next = isa_devlist;
isa_devlist = id_pn;
return 0;
diff --git a/sys/pc98/pc98/aic6360.c b/sys/pc98/pc98/aic6360.c
index b12a16c..c035599 100644
--- a/sys/pc98/pc98/aic6360.c
+++ b/sys/pc98/pc98/aic6360.c
@@ -31,7 +31,7 @@
*/
/*
- * $Id: aic6360.c,v 1.21 1996/05/02 10:43:08 phk Exp $
+ * $Id: aic6360.c,v 1.1.1.1 1996/06/14 10:04:42 asami Exp $
*
* Acknowledgements: Many of the algorithms used in this driver are
* inspired by the work of Julian Elischer (julian@tfs.com) and
@@ -686,13 +686,8 @@ static int aic_debug = 0; /* AIC_SHOWSTART|AIC_SHOWMISC|AIC_SHOWTRAC; */
#define AIC_START(str)
#endif
-#ifdef PC98
-static int aicprobe __P((struct pc98_device *));
-static int aicattach __P((struct pc98_device *));
-#else
static int aicprobe __P((struct isa_device *));
static int aicattach __P((struct isa_device *));
-#endif
static void aic_minphys __P((struct buf *));
static u_int32_t aic_adapter_info __P((int));
static void aic_init __P((struct aic_data *));
@@ -718,11 +713,7 @@ void aic_dump_driver __P((void));
#endif
/* Linkup to the rest of the kernel */
-#ifdef PC98
-struct pc98_driver aicdriver = {
-#else
struct isa_driver aicdriver = {
-#endif
aicprobe, aicattach, "aic"
};
@@ -765,11 +756,7 @@ static struct kern_devconf kdc_aic[NAIC] = { {
} };
static inline void
-#ifdef PC98
-aic_registerdev(struct pc98_device *id)
-#else
aic_registerdev(struct isa_device *id)
-#endif
{
if(id->id_unit)
kdc_aic[id->id_unit] = kdc_aic[0];
@@ -788,11 +775,7 @@ aic_registerdev(struct isa_device *id)
*/
static int
aicprobe(dev)
-#ifdef PC98
- struct pc98_device *dev;
-#else
struct isa_device *dev;
-#endif
{
int unit = aicunit;
struct aic_data *aic;
@@ -889,11 +872,7 @@ aic_find(aic)
*/
static int
aicattach(dev)
-#ifdef PC98
- struct pc98_device *dev;
-#else
struct isa_device *dev;
-#endif
{
int unit = dev->id_unit;
struct aic_data *aic = aicdata[unit];
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index 1295b3e..c4ec6ff 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.2 1996/07/23 07:46:11 asami Exp $
+ * $Id: fd.c,v 1.3 1996/07/30 18:55:58 asami Exp $
*
*/
@@ -144,11 +144,7 @@ fd_registerdev(int ctlr, int unit)
}
static inline void
-#ifdef PC98
-fdc_registerdev(struct pc98_device *dvp)
-#else
fdc_registerdev(struct isa_device *dvp)
-#endif
{
int unit = dvp->id_unit;
@@ -378,21 +374,12 @@ void ftstrategy(struct buf *);
int ftioctl(dev_t, int, caddr_t, int, struct proc *);
int ftdump(dev_t);
int ftsize(dev_t);
-#ifdef PC98
-int ftattach(struct pc98_device *, struct pc98_device *, int);
-#else
int ftattach(struct isa_device *, struct isa_device *, int);
#endif
-#endif
/* autoconfig functions */
-#ifdef PC98
-static int fdprobe(struct pc98_device *);
-static int fdattach(struct pc98_device *);
-#else
static int fdprobe(struct isa_device *);
static int fdattach(struct isa_device *);
-#endif
/* needed for ft driver, thus exported */
int in_fdc(fdcu_t);
@@ -455,11 +442,7 @@ static int volatile fd_debug = 0;
#endif /* DEBUG */
/* autoconfig structure */
-#ifdef PC98
-struct pc98_driver fdcdriver = {
-#else
struct isa_driver fdcdriver = {
-#endif
fdprobe, fdattach, "fdc",
};
@@ -476,11 +459,7 @@ static struct bdevsw fd_bdevsw =
nodump, nopsize, 0, "fd", &fd_cdevsw, -1 };
-#ifdef PC98
-static struct pc98_device *fdcdevs[NFDC];
-#else
static struct isa_device *fdcdevs[NFDC];
-#endif
/*
* Provide hw.devconf information.
@@ -721,11 +700,7 @@ static int pc98_fd_check_ready(fdu)
* probe for existance of controller
*/
static int
-#ifdef PC98
-fdprobe(struct pc98_device *dev)
-#else
fdprobe(struct isa_device *dev)
-#endif
{
fdcu_t fdcu = dev->id_unit;
if(fdc_data[fdcu].flags & FDC_ATTACHED)
@@ -769,11 +744,7 @@ fdprobe(struct isa_device *dev)
* wire controller into system, look for floppy units
*/
static int
-#ifdef PC98
-fdattach(struct pc98_device *dev)
-#else
fdattach(struct isa_device *dev)
-#endif
{
unsigned fdt;
fdu_t fdu;
@@ -784,11 +755,7 @@ fdattach(struct isa_device *dev)
#if NFT > 0
int unithasfd;
#endif
-#ifdef PC98
- struct pc98_device *fdup;
-#else
struct isa_device *fdup;
-#endif
int ic_type = 0;
#ifdef DEVFS
int mynor;
diff --git a/sys/pc98/pc98/ft.c b/sys/pc98/pc98/ft.c
index e030e9c..f92aa35 100644
--- a/sys/pc98/pc98/ft.c
+++ b/sys/pc98/pc98/ft.c
@@ -17,7 +17,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* ft.c - QIC-40/80 floppy tape driver
- * $Id: ft.c,v 1.1.1.1 1996/06/14 10:04:43 asami Exp $
+ * $Id: ft.c,v 1.2 1996/07/23 07:46:13 asami Exp $
*
* 01/19/95 ++sg
* Cleaned up recalibrate/seek code at attach time for FreeBSD 2.x.
@@ -301,11 +301,7 @@ static struct ft_data {
int ftopen(dev_t, int);
int ftclose(dev_t, int);
int ftioctl(dev_t, int, caddr_t, int, struct proc *);
-#ifdef PC98
-int ftattach(struct pc98_device *, struct pc98_device *, int);
-#else
int ftattach(struct isa_device *, struct isa_device *, int);
-#endif
static timeout_t ft_timeout;
static void async_cmd(ftu_t);
static void async_req(ftu_t, int);
@@ -449,11 +445,7 @@ ft_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
*/
int
ftattach(isadev, fdup, unithasfd)
-#ifdef PC98
- struct pc98_device *isadev, *fdup;
-#else
struct isa_device *isadev, *fdup;
-#endif
int unithasfd;
{
fdcu_t fdcu = isadev->id_unit; /* fdc active unit */
diff --git a/sys/pc98/pc98/if_ed.c b/sys/pc98/pc98/if_ed.c
index 0c7ce40..70e757d 100644
--- a/sys/pc98/pc98/if_ed.c
+++ b/sys/pc98/pc98/if_ed.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ed.c,v 1.2 1996/07/23 07:46:15 asami Exp $
+ * $Id: if_ed.c,v 1.3 1996/08/30 10:42:59 asami Exp $
*/
/*
@@ -171,41 +171,25 @@ struct ed_softc {
static struct ed_softc ed_softc[NED];
static int ed_attach __P((struct ed_softc *, int, int));
-#ifdef PC98
-static int ed_attach_isa __P((struct pc98_device *));
-#else
static int ed_attach_isa __P((struct isa_device *));
-#endif
static void ed_init __P((struct ed_softc *));
static int ed_ioctl __P((struct ifnet *, int, caddr_t));
-#ifdef PC98
-static int ed_probe __P((struct pc98_device *));
-#else
static int ed_probe __P((struct isa_device *));
-#endif
static void ed_start __P((struct ifnet *));
static void ed_reset __P((struct ifnet *));
static void ed_watchdog __P((struct ifnet *));
static void ed_stop __P((struct ed_softc *));
static int ed_probe_generic8390 __P((struct ed_softc *));
-#ifdef PC98
-static int ed_probe_WD80x3 __P((struct pc98_device *));
-static int ed_probe_3Com __P((struct pc98_device *));
-static int ed_probe_Novell __P((struct pc98_device *));
-static int ed_probe_SIC98 __P((struct pc98_device *));
-#else
static int ed_probe_WD80x3 __P((struct isa_device *));
static int ed_probe_3Com __P((struct isa_device *));
static int ed_probe_Novell __P((struct isa_device *));
-#endif
static int ed_probe_Novell_generic __P((struct ed_softc *, int, int, int));
#ifdef PC98
-static int ed_probe_HP_pclanp __P((struct pc98_device *));
-#else
-static int ed_probe_HP_pclanp __P((struct isa_device *));
+static int ed_probe_SIC98 __P((struct isa_device *));
#endif
+static int ed_probe_HP_pclanp __P((struct isa_device *));
#include "pci.h"
#if NPCI > 0
@@ -214,12 +198,8 @@ void *ed_attach_NE2000_pci __P((int, int));
#include "crd.h"
#if NCRD > 0
-#ifdef PC98
-static int ed_probe_pccard __P((struct pc98_device *, u_char *));
-#else
static int ed_probe_pccard __P((struct isa_device *, u_char *));
#endif
-#endif
static void ds_getmcaf __P((struct ed_softc *, u_long *));
@@ -358,11 +338,7 @@ card_intr(struct pccard_dev *dp)
}
#endif /* NCRD > 0 */
-#ifdef PC98
-struct pc98_driver eddriver = {
-#else
struct isa_driver eddriver = {
-#endif
ed_probe,
ed_attach_isa,
"ed",
@@ -439,11 +415,7 @@ static struct kern_devconf kdc_ed_template = {
};
static inline void
-#ifdef PC98
-ed_registerdev(struct pc98_device *id, const char *descr)
-#else
ed_registerdev(struct isa_device *id, const char *descr)
-#endif
{
struct kern_devconf *kdc = &ed_softc[id->id_unit].kdc;
*kdc = kdc_ed_template;
@@ -464,11 +436,7 @@ ed_registerdev(struct isa_device *id, const char *descr)
*/
static int
ed_probe(isa_dev)
-#ifdef PC98
- struct pc98_device *isa_dev;
-#else
struct isa_device *isa_dev;
-#endif
{
int nports;
@@ -507,9 +475,7 @@ ed_probe(isa_dev)
*/
ed_softc[isa_dev->id_unit].type = ED_TYPE98_GENERIC;
pc98_set_register(isa_dev, isa_dev->id_unit, ED_TYPE98_GENERIC);
-#endif
-#ifdef PC98
if (ED_TYPE98(isa_dev) == ED_TYPE98_GENERIC) {
#endif
nports = ed_probe_WD80x3(isa_dev);
@@ -525,7 +491,6 @@ ed_probe(isa_dev)
return (nports);
#ifdef PC98
}
-#endif
/*
* Allied Telesis SIC-98
@@ -619,11 +584,11 @@ ed_probe(isa_dev)
if (nports)
return (nports);
}
-#ifdef NCDR > 0
+#endif
+
nports = ed_probe_HP_pclanp(isa_dev);
if (nports)
return (nports);
-#endif
return (0);
}
@@ -685,11 +650,7 @@ ed_probe_generic8390(sc)
*/
static int
ed_probe_WD80x3(isa_dev)
-#ifdef PC98
- struct pc98_device *isa_dev;
-#else
struct isa_device *isa_dev;
-#endif
{
struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
int i;
@@ -1083,11 +1044,7 @@ ed_probe_WD80x3(isa_dev)
*/
static int
ed_probe_3Com(isa_dev)
-#ifdef PC98
- struct pc98_device *isa_dev;
-#else
struct isa_device *isa_dev;
-#endif
{
struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
int i;
@@ -1651,11 +1608,7 @@ ed_probe_Novell_generic(sc, port, unit, flags)
static int
ed_probe_Novell(isa_dev)
-#ifdef PC98
- struct pc98_device *isa_dev;
-#else
struct isa_device *isa_dev;
-#endif
{
struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
@@ -1668,6 +1621,119 @@ ed_probe_Novell(isa_dev)
#if NCRD > 0
+/*
+ * Probe and vendor-specific initialization routine for PCCARDs
+ */
+static int
+ed_probe_pccard(isa_dev, ether)
+ struct isa_device *isa_dev;
+ u_char *ether;
+{
+ struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
+ int i;
+ u_int memsize;
+ u_char isa16bit;
+#ifdef PC98
+ int unit = isa_dev->id_unit;
+#endif
+
+ sc->nic_addr = isa_dev->id_iobase;
+ sc->gone = 0;
+ sc->is790 = 0;
+ sc->cr_proto = ED_CR_RD2;
+ sc->vendor = ED_VENDOR_PCCARD;
+ sc->type = 0;
+ sc->type_str = "PCCARD";
+ sc->kdc.kdc_description = "PCCARD Ethernet";
+ sc->mem_size = isa_dev->id_msize = memsize = 16384;
+ sc->isa16bit = isa16bit = 1;
+
+ for (i = 0; i < ETHER_ADDR_LEN; ++i)
+ sc->arpcom.ac_enaddr[i] = ether[i];
+
+#if ED_DEBUG
+ printf("type = %x type_str=%s isa16bit=%d memsize=%d id_msize=%d\n",
+ sc->type, sc->type_str, isa16bit, memsize, isa_dev->id_msize);
+#endif
+
+ i = inb(sc->nic_addr + ED_PC_RESET);
+ DELAY(100000);
+ outb(sc->nic_addr + ED_PC_RESET,i);
+ DELAY(100000);
+ i = inb(sc->nic_addr + ED_PC_MISC);
+ if (!i) {
+ int j;
+ printf("ed_probe_pccard: possible failure\n");
+ for (j=0;j<20 && !i;j++) {
+ printf(".");
+ DELAY(100000);
+ i = inb(sc->nic_addr + ED_PC_MISC);
+ }
+ if (!i) {
+ printf("dead :-(\n");
+ return 0;
+ }
+ printf("\n");
+ }
+ /*
+ * Set initial values for width/size.
+ */
+
+ /* Make sure that we really have an 8390 based board */
+ if (!ed_probe_generic8390(sc)) {
+ printf("ed_probe_generic8390 failed\n");
+ return (0);
+ }
+ sc->txb_cnt = 2;
+ sc->tx_page_start = ED_PC_PAGE_OFFSET;
+ sc->rec_page_start = sc->tx_page_start + ED_TXBUF_SIZE * sc->txb_cnt;
+ sc->rec_page_stop = sc->tx_page_start + memsize / ED_PAGE_SIZE;
+
+ sc->mem_shared = 1;
+ sc->mem_start = (caddr_t) isa_dev->id_maddr;
+ sc->mem_size = memsize;
+ sc->mem_end = sc->mem_start + memsize;
+
+ sc->mem_ring = sc->mem_start +
+ sc->txb_cnt * ED_PAGE_SIZE * ED_TXBUF_SIZE;
+
+ /*
+ * Now zero memory and verify that it is clear
+ */
+ bzero(sc->mem_start, memsize);
+
+ for (i = 0; i < memsize; ++i) {
+ if (sc->mem_start[i]) {
+ printf("ed%d: failed to clear shared memory at %lx - check configuration\n",
+ isa_dev->id_unit, kvtop(sc->mem_start + i));
+
+ return (0);
+ }
+ sc->mem_start[i] = (i - 5) & 0xff;
+ }
+ for (i = 0; i < memsize; ++i) {
+ if ((sc->mem_start[i] & 0xff) != ((i - 5) & 0xff)) {
+ printf("ed%d: shared memory failed at %lx (%x != %x) - check configuration\n",
+ isa_dev->id_unit, kvtop(sc->mem_start + i),
+ sc->mem_start[i], (i-5) & 0xff);
+ return (0);
+
+ }
+ }
+
+ i = inb(sc->nic_addr + ED_PC_MISC);
+ if (!i) {
+ printf("ed_probe_pccard: possible failure(2)\n");
+ }
+
+ /* clear any pending interupts that we may have caused */
+ outb(sc->nic_addr + ED_P0_ISR, 0xff);
+
+ return (ED_PC_IO_PORTS);
+}
+
+#endif /* NCRD > 0 */
+
#define ED_HPP_TEST_SIZE 16
/*
@@ -1694,11 +1760,7 @@ ed_probe_Novell(isa_dev)
*/
static int
ed_probe_HP_pclanp(isa_dev)
-#ifdef PC98
struct isa_device *isa_dev;
-#else
- struct isa_device *isa_dev;
-#endif
{
struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
int n; /* temp var */
@@ -1707,7 +1769,9 @@ ed_probe_HP_pclanp(isa_dev)
u_char irq; /* board configured IRQ */
char test_pattern[ED_HPP_TEST_SIZE]; /* read/write areas for */
char test_buffer[ED_HPP_TEST_SIZE]; /* probing card */
-
+#ifdef PC98
+ int unit = isa_dev->id_unit;
+#endif
/* Fill in basic information */
sc->asic_addr = isa_dev->id_iobase + ED_HPP_ASIC_OFFSET;
@@ -1991,126 +2055,8 @@ ed_hpp_set_physical_link(struct ed_softc *sc)
}
-/*
- * Probe and vendor-specific initialization routine for PCCARDs
- */
-static int
-ed_probe_pccard(isa_dev, ether)
#ifdef PC98
- struct pc98_device *isa_dev;
-#else
- struct isa_device *isa_dev;
-#endif
- u_char *ether;
-{
- struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
- int i;
- u_int memsize;
- u_char isa16bit;
-#ifdef PC98
- int unit = isa_dev->id_unit;
-#endif
-
- sc->nic_addr = isa_dev->id_iobase;
- sc->gone = 0;
- sc->is790 = 0;
- sc->cr_proto = ED_CR_RD2;
- sc->vendor = ED_VENDOR_PCCARD;
- sc->type = 0;
- sc->type_str = "PCCARD";
- sc->kdc.kdc_description = "PCCARD Ethernet";
- sc->mem_size = isa_dev->id_msize = memsize = 16384;
- sc->isa16bit = isa16bit = 1;
-
- for (i = 0; i < ETHER_ADDR_LEN; ++i)
- sc->arpcom.ac_enaddr[i] = ether[i];
-
-#if ED_DEBUG
- printf("type = %x type_str=%s isa16bit=%d memsize=%d id_msize=%d\n",
- sc->type, sc->type_str, isa16bit, memsize, isa_dev->id_msize);
-#endif
-
- i = inb(sc->nic_addr + ED_PC_RESET);
- DELAY(100000);
- outb(sc->nic_addr + ED_PC_RESET,i);
- DELAY(100000);
- i = inb(sc->nic_addr + ED_PC_MISC);
- if (!i) {
- int j;
- printf("ed_probe_pccard: possible failure\n");
- for (j=0;j<20 && !i;j++) {
- printf(".");
- DELAY(100000);
- i = inb(sc->nic_addr + ED_PC_MISC);
- }
- if (!i) {
- printf("dead :-(\n");
- return 0;
- }
- printf("\n");
- }
- /*
- * Set initial values for width/size.
- */
-
- /* Make sure that we really have an 8390 based board */
- if (!ed_probe_generic8390(sc)) {
- printf("ed_probe_generic8390 failed\n");
- return (0);
- }
- sc->txb_cnt = 2;
- sc->tx_page_start = ED_PC_PAGE_OFFSET;
- sc->rec_page_start = sc->tx_page_start + ED_TXBUF_SIZE * sc->txb_cnt;
- sc->rec_page_stop = sc->tx_page_start + memsize / ED_PAGE_SIZE;
-
- sc->mem_shared = 1;
- sc->mem_start = (caddr_t) isa_dev->id_maddr;
- sc->mem_size = memsize;
- sc->mem_end = sc->mem_start + memsize;
-
- sc->mem_ring = sc->mem_start +
- sc->txb_cnt * ED_PAGE_SIZE * ED_TXBUF_SIZE;
-
- /*
- * Now zero memory and verify that it is clear
- */
- bzero(sc->mem_start, memsize);
-
- for (i = 0; i < memsize; ++i) {
- if (sc->mem_start[i]) {
- printf("ed%d: failed to clear shared memory at %lx - check configuration\n",
- isa_dev->id_unit, kvtop(sc->mem_start + i));
-
- return (0);
- }
- sc->mem_start[i] = (i - 5) & 0xff;
- }
- for (i = 0; i < memsize; ++i) {
- if ((sc->mem_start[i] & 0xff) != ((i - 5) & 0xff)) {
- printf("ed%d: shared memory failed at %lx (%x != %x) - check configuration\n",
- isa_dev->id_unit, kvtop(sc->mem_start + i),
- sc->mem_start[i], (i-5) & 0xff);
- return (0);
-
- }
- }
-
- i = inb(sc->nic_addr + ED_PC_MISC);
- if (!i) {
- printf("ed_probe_pccard: possible failure(2)\n");
- }
-
- /* clear any pending interupts that we may have caused */
- outb(sc->nic_addr + ED_P0_ISR, 0xff);
-
- return (ED_PC_IO_PORTS);
-}
-
-#endif /* NCRD > 0 */
-
-
-#ifdef PC98
-static int ed_probe_SIC98(struct pc98_device* pc98_dev)
+static int ed_probe_SIC98(struct isa_device* pc98_dev)
{
int i;
struct ed_softc *sc = &ed_softc[pc98_dev->id_unit];
@@ -2278,11 +2224,7 @@ ed_attach(sc, unit, flags)
static int
ed_attach_isa(isa_dev)
-#ifdef PC98
- struct pc98_device *isa_dev;
-#else
struct isa_device *isa_dev;
-#endif
{
int unit = isa_dev->id_unit;
struct ed_softc *sc = &ed_softc[unit];
@@ -3171,11 +3113,8 @@ ed_ioctl(ifp, command, data)
} else {
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
}
- }
-#if NCRD > 0
- else if (sc->vendor == ED_VENDOR_HP)
+ } else if (sc->vendor == ED_VENDOR_HP)
ed_hpp_set_physical_link(sc);
-#endif
break;
case SIOCADDMULTI:
@@ -3363,6 +3302,7 @@ ed_pio_readmem(sc, src, dst, amount)
return;
}
+ /* Regular Novell cards */
/* select page 0 registers */
outb(sc->nic_addr + ED_P0_CR, ED_CR_RD2 | ED_CR_STA);
diff --git a/sys/pc98/pc98/if_ed98.h b/sys/pc98/pc98/if_ed98.h
index 9826c4c..9d7f102 100644
--- a/sys/pc98/pc98/if_ed98.h
+++ b/sys/pc98/pc98/if_ed98.h
@@ -36,7 +36,7 @@
#error Why you include if_ed98.h?
#endif
-static void pc98_set_register __P((struct pc98_device *dev,
+static void pc98_set_register __P((struct isa_device *dev,
int unit, int type));
/*
@@ -315,7 +315,7 @@ static unsigned int edp_nec108[16] = {
0x1000, 0x1002, 0x1004, 0x1006, 0x1008, 0x100a, 0x100c, 0x100e
};
-static void pc98_set_register(struct pc98_device *dev, int unit, int type)
+static void pc98_set_register(struct isa_device *dev, int unit, int type)
{
int adj;
diff --git a/sys/pc98/pc98/if_ep.c b/sys/pc98/pc98/if_ep.c
index bc32ada..9c74878 100644
--- a/sys/pc98/pc98/if_ep.c
+++ b/sys/pc98/pc98/if_ep.c
@@ -38,7 +38,7 @@
*/
/*
- * $Id: if_ep.c,v 1.2 1996/07/23 07:46:17 asami Exp $
+ * $Id: if_ep.c,v 1.3 1996/07/30 18:56:03 asami Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -124,19 +124,11 @@ struct ep_board ep_board[EP_MAX_BOARDS + 1];
static int eeprom_rdy __P((struct ep_softc *sc));
-#ifdef PC98
-static int ep_isa_probe __P((struct pc98_device *));
-static struct ep_board * ep_look_for_board_at __P((struct pc98_device *is));
-static int ep_isa_attach __P((struct pc98_device *));
-static void ep_isa_registerdev __P((struct ep_softc *sc,
- struct pc98_device *id));
-#else
static int ep_isa_probe __P((struct isa_device *));
static struct ep_board * ep_look_for_board_at __P((struct isa_device *is));
static int ep_isa_attach __P((struct isa_device *));
static void ep_isa_registerdev __P((struct ep_softc *sc,
struct isa_device *id));
-#endif
static int epioctl __P((struct ifnet * ifp, int, caddr_t));
static void epmbuffill __P((caddr_t, int));
static void epmbufempty __P((struct ep_softc *));
@@ -161,11 +153,7 @@ static char *ep_conn_type[] = {"UTP", "AUI", "???", "BNC"};
#define ep_fset(f) (sc->stat|=(f))
#define ep_frst(f) (sc->stat&=~(f))
-#ifdef PC98
-struct pc98_driver epdriver = {
-#else
struct isa_driver epdriver = {
-#endif
ep_isa_probe,
ep_isa_attach,
"ep",
@@ -236,11 +224,7 @@ ep_pccard_init(dp, first)
struct pccard_dev *dp;
int first;
{
-#ifdef PC98
- struct pc98_device *is = &dp->isahd;
-#else
struct isa_device *is = &dp->isahd;
-#endif
struct ep_softc *sc = ep_softc[is->id_unit];
struct ep_board *epb;
int i;
@@ -298,11 +282,7 @@ static int
ep_pccard_attach(dp)
struct pccard_dev *dp;
{
-#ifdef PC98
- struct pc98_device *is = &dp->isahd;
-#else
struct isa_device *is = &dp->isahd;
-#endif
struct ep_softc *sc = ep_softc[is->id_unit];
u_short config;
@@ -365,11 +345,7 @@ card_intr(dp)
static void
ep_isa_registerdev(sc, id)
struct ep_softc *sc;
-#ifdef PC98
- struct pc98_device *id;
-#else
struct isa_device *id;
-#endif
{
sc->kdc = (struct kern_devconf *)malloc(sizeof(struct kern_devconf),
M_DEVBUF, M_NOWAIT);
@@ -400,11 +376,7 @@ eeprom_rdy(sc)
static struct ep_board *
ep_look_for_board_at(is)
-#ifdef PC98
- struct pc98_device *is;
-#else
struct isa_device *is;
-#endif
{
int data, i, j, id_port = ELINK_ID_PORT;
int count = 0;
@@ -569,11 +541,7 @@ ep_free(sc)
int
ep_isa_probe(is)
-#ifdef PC98
- struct pc98_device *is;
-#else
struct isa_device *is;
-#endif
{
struct ep_softc *sc;
struct ep_board *epb;
@@ -636,11 +604,7 @@ ep_isa_probe(is)
static int
ep_isa_attach(is)
-#ifdef PC98
- struct pc98_device *is;
-#else
struct isa_device *is;
-#endif
{
struct ep_softc *sc = ep_softc[is->id_unit];
u_short config;
diff --git a/sys/pc98/pc98/if_fe.c b/sys/pc98/pc98/if_fe.c
index 482136f..5f911f0 100644
--- a/sys/pc98/pc98/if_fe.c
+++ b/sys/pc98/pc98/if_fe.c
@@ -21,7 +21,7 @@
*/
/*
- * $Id: if_fe.c,v 1.2 1996/07/23 07:46:19 asami Exp $
+ * $Id: if_fe.c,v 1.3 1996/08/30 10:43:02 asami Exp $
*
* Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards.
* To be used with FreeBSD 2.x
@@ -157,11 +157,7 @@
* Override the following macro to adapt it to another bus.
* (E.g., PC98.)
*/
-#ifdef PC98
-#define DEVICE struct pc98_device
-#else
#define DEVICE struct isa_device
-#endif
/*
* Default settings for fe driver specific options.
@@ -297,11 +293,7 @@ static void fe_dump ( int, struct fe_softc *, char * );
#endif
/* Driver struct used in the config code. This must be public (external.) */
-#ifdef PC98
-struct pc98_driver fedriver =
-#else
struct isa_driver fedriver =
-#endif
{
fe_probe,
fe_attach,
diff --git a/sys/pc98/pc98/if_zp.c b/sys/pc98/pc98/if_zp.c
index 4c79f2e..568ccf8 100644
--- a/sys/pc98/pc98/if_zp.c
+++ b/sys/pc98/pc98/if_zp.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $
- * $Id: if_zp.c,v 1.2 1996/07/23 07:46:22 asami Exp $
+ * $Id: if_zp.c,v 1.3 1996/08/30 10:43:03 asami Exp $
*/
/*-
* TODO:
@@ -188,13 +188,8 @@ static struct zp_softc {
#endif /* NAPM > 0 */
} zp_softc[NZP];
-#ifdef PC98
-static int zpprobe __P((struct pc98_device *));
-static int zpattach __P((struct pc98_device *));
-#else
static int zpprobe __P((struct isa_device *));
static int zpattach __P((struct isa_device *));
-#endif
static int zp_suspend __P((void *visa_dev));
static int zp_resume __P((void *visa_dev));
static int zpioctl __P((struct ifnet * ifp, int, caddr_t));
@@ -209,11 +204,7 @@ static void zpstart __P((struct ifnet *));
static void zpstop __P((int));
static void zpwatchdog __P((struct ifnet *));
-#ifdef PC98
-struct pc98_driver zpdriver = {
-#else
struct isa_driver zpdriver = {
-#endif
zpprobe,
zpattach,
"zp"
@@ -341,11 +332,7 @@ zp_find_adapter(unsigned char *scratch, int reconfig)
* or # of i/o addresses used (if found)
*/
static int
-#ifdef PC98
-zpprobe(struct pc98_device * isa_dev)
-#else
zpprobe(struct isa_device * isa_dev)
-#endif
{
struct zp_softc *sc = &zp_softc[isa_dev->id_unit];
int slot;
@@ -459,11 +446,7 @@ static int
zp_suspend(visa_dev)
void *visa_dev;
{
-#ifdef PC98
- struct pc98_device *isa_dev = visa_dev;
-#else
struct isa_device *isa_dev = visa_dev;
-#endif
struct zp_softc *sc = &zp_softc[isa_dev->id_unit];
pcic_power_off(sc->slot);
@@ -474,11 +457,7 @@ static int
zp_resume(visa_dev)
void *visa_dev;
{
-#ifdef PC98
- struct pc98_device *isa_dev = visa_dev;
-#else
struct isa_device *isa_dev = visa_dev;
-#endif
prev_slot = 0;
reconfig_isadev(isa_dev, &net_imask);
@@ -493,11 +472,7 @@ zp_resume(visa_dev)
static int
zpattach(isa_dev)
-#ifdef PC98
- struct pc98_device *isa_dev;
-#else
struct isa_device *isa_dev;
-#endif
{
struct zp_softc *sc = &zp_softc[isa_dev->id_unit];
struct ifnet *ifp = &sc->arpcom.ac_if;
diff --git a/sys/pc98/pc98/lpt.c b/sys/pc98/pc98/lpt.c
index fb174de..967910e 100644
--- a/sys/pc98/pc98/lpt.c
+++ b/sys/pc98/pc98/lpt.c
@@ -46,7 +46,7 @@
* SUCH DAMAGE.
*
* from: unknown origin, 386BSD 0.1
- * $Id: lpt.c,v 1.1.1.1 1996/06/14 10:04:44 asami Exp $
+ * $Id: lpt.c,v 1.2 1996/07/23 07:46:24 asami Exp $
*/
/*
@@ -272,13 +272,8 @@ static struct lpt_softc {
#define MAX_SPIN 20 /* Max delay for device ready in usecs */
static void lptout (struct lpt_softc * sc);
-#ifdef PC98
-static int lptprobe (struct pc98_device *dvp);
-static int lptattach (struct pc98_device *isdp);
-#else
static int lptprobe (struct isa_device *dvp);
static int lptattach (struct isa_device *isdp);
-#endif
#ifdef INET
@@ -306,11 +301,9 @@ static void lpintr(int);
#ifndef PC98_LPT_INTR
void lptintr(int unit);
#endif
+#endif
-struct pc98_driver lptdriver = {
-#else
struct isa_driver lptdriver = {
-#endif
lptprobe, lptattach, "lpt"
};
@@ -343,13 +336,8 @@ static struct kern_devconf kdc_lpt[NLPT] = { {
DC_CLS_PARALLEL | DC_CLS_NETIF /* class */
} };
-#ifdef PC98
-static inline void
-lpt_registerdev(struct pc98_device *id)
-#else
static inline void
lpt_registerdev(struct isa_device *id)
-#endif
{
if(id->id_unit)
kdc_lpt[id->id_unit] = kdc_lpt[0];
@@ -430,7 +418,7 @@ lpt_port_test (short port, u_char data, u_char mask)
#ifdef PC98
int
-lptprobe(struct pc98_device *dvp)
+lptprobe(struct isa_device *dvp)
{
return 8;
}
@@ -500,13 +488,8 @@ end_probe:
#endif
/* XXX Todo - try and detect if interrupt is working */
-#ifdef PC98
-int
-lptattach(struct pc98_device *isdp)
-#else
int
lptattach(struct isa_device *isdp)
-#endif
{
struct lpt_softc *sc;
int unit;
diff --git a/sys/pc98/pc98/matcd/matcd.c b/sys/pc98/pc98/matcd/matcd.c
index d4678aa..38dde6a 100644
--- a/sys/pc98/pc98/matcd/matcd.c
+++ b/sys/pc98/pc98/matcd/matcd.c
@@ -337,7 +337,7 @@ static char MATCDVERSION[]="Version 1(26) 18-Oct-95";
static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank Durda IV";
/* The proceeding strings may not be changed*/
-/* $Id: matcd.c,v 1.1.1.1 1996/06/14 10:04:51 asami Exp $ */
+/* $Id: matcd.c,v 1.2 1996/07/30 18:56:16 asami Exp $ */
/*---------------------------------------------------------------------------
Include declarations
@@ -532,17 +532,10 @@ static struct kern_devconf kdc_matcd[TOTALDRIVES] = { {
--- not any more :)
---------------------------------------------------------------------------*/
-#ifdef PC98
-static int matcd_probe(struct pc98_device *dev);
-static int matcd_attach(struct pc98_device *dev);
-struct pc98_driver matcddriver={matcd_probe, matcd_attach,
- "matcdc"};
-#else
static int matcd_probe(struct isa_device *dev);
static int matcd_attach(struct isa_device *dev);
struct isa_driver matcddriver={matcd_probe, matcd_attach,
"matcdc"};
-#endif
static d_open_t matcdopen;
@@ -1217,11 +1210,7 @@ int matcdsize(dev_t dev)
---------------------------------------------------------------------------*/
static int
-#ifdef PC98
-matcd_probe(struct pc98_device *dev)
-#else
matcd_probe(struct isa_device *dev)
-#endif
{
int i,cdrive;
unsigned char y;
@@ -1365,11 +1354,7 @@ int doprobe(int port,int cdrive)
Added in Edit 12.
---------------------------------------------------------------------------*/
-#ifdef PC98
-static inline void matcd_register(struct pc98_device *id)
-#else
static inline void matcd_register(struct isa_device *id)
-#endif
{
if(id->id_unit) {
kdc_matcd[id->id_unit]=kdc_matcd[0];
@@ -1395,11 +1380,7 @@ static inline void matcd_register(struct isa_device *id)
---------------------------------------------------------------------------*/
static int
-#ifdef PC98
-matcd_attach(struct pc98_device *dev)
-#else
matcd_attach(struct isa_device *dev)
-#endif
{
int i;
unsigned int z,cdrive;
diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c
index 79c456f..be2f02d 100644
--- a/sys/pc98/pc98/mse.c
+++ b/sys/pc98/pc98/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.27 1996/06/08 09:37:51 bde Exp $
+ * $Id: mse.c,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -69,19 +69,10 @@
#endif
-#ifdef PC98
-static int mseprobe(struct pc98_device *);
-static int mseattach(struct pc98_device *);
-#else
static int mseprobe(struct isa_device *);
static int mseattach(struct isa_device *);
-#endif
-#ifdef PC98
-struct pc98_driver msedriver = {
-#else
struct isa_driver msedriver = {
-#endif
mseprobe, mseattach, "mse"
};
@@ -177,7 +168,7 @@ static struct mse_softc {
static int msport;
static int msirq;
-static int mse_probe98m __P((struct pc98_device *idp));
+static int mse_probe98m __P((struct isa_device *idp));
static void mse_disable98m __P((u_int port));
static void mse_get98m __P((u_int port, int *dx, int *dy, int *but));
static void mse_enable98m __P((u_int port));
@@ -250,11 +241,7 @@ static void mse_getati __P((u_int port, int *dx, int *dy, int *but));
*/
static struct mse_types {
int m_type; /* Type of bus mouse */
-#ifdef PC98
- int (*m_probe) __P((struct pc98_device *idp));
-#else
int (*m_probe) __P((struct isa_device *idp));
-#endif
/* Probe routine to test for it */
void (*m_enable) __P((u_int port));
/* Start routine */
@@ -290,11 +277,7 @@ static struct kern_devconf kdc_mse[NMSE] = { {
} };
static inline void
-#ifdef PC98
-mse_registerdev(struct pc98_device *id)
-#else
mse_registerdev(struct isa_device *id)
-#endif
{
if(id->id_unit)
kdc_mse[id->id_unit] = kdc_mse[0];
@@ -309,11 +292,7 @@ mse_registerdev(struct isa_device *id)
int
mseprobe(idp)
-#ifdef PC98
- register struct pc98_device *idp;
-#else
register struct isa_device *idp;
-#endif
{
register struct mse_softc *sc = &mse_sc[idp->id_unit];
register int i;
@@ -338,11 +317,7 @@ mseprobe(idp)
int
mseattach(idp)
-#ifdef PC98
- struct pc98_device *idp;
-#else
struct isa_device *idp;
-#endif
{
int unit = idp->id_unit;
struct mse_softc *sc = &mse_sc[unit];
@@ -716,7 +691,7 @@ mse_getati(port, dx, dy, but)
*/
static int
mse_probe98m(idp)
- register struct pc98_device *idp;
+ register struct isa_device *idp;
{
msport = NORMAL_MSPORT;
diff --git a/sys/pc98/pc98/npx.c b/sys/pc98/pc98/npx.c
index e94b17b..3a033ca 100644
--- a/sys/pc98/pc98/npx.c
+++ b/sys/pc98/pc98/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
+ * $Id: npx.c,v 1.2 1996/07/23 07:46:26 asami Exp $
*/
#include "npx.h"
@@ -106,21 +106,11 @@ void stop_emulating __P((void));
typedef u_char bool_t;
-#ifdef PC98
-static int npxattach __P((struct pc98_device *dvp));
-static int npxprobe __P((struct pc98_device *dvp));
-static int npxprobe1 __P((struct pc98_device *dvp));
-#else
static int npxattach __P((struct isa_device *dvp));
static int npxprobe __P((struct isa_device *dvp));
static int npxprobe1 __P((struct isa_device *dvp));
-#endif
-#ifdef PC98
-struct pc98_driver npxdriver = {
-#else
struct isa_driver npxdriver = {
-#endif
npxprobe, npxattach, "npx",
};
@@ -201,11 +191,7 @@ static struct kern_devconf kdc_npx[NNPX] = { {
} };
static inline void
-#ifdef PC98
-npx_registerdev(struct pc98_device *id)
-#else
npx_registerdev(struct isa_device *id)
-#endif
{
int unit;
@@ -229,7 +215,7 @@ npx_registerdev(struct isa_device *id)
*/
static int
npxprobe(dvp)
- struct pc98_device *dvp;
+ struct isa_device *dvp;
{
int result;
u_long save_eflags;
@@ -285,7 +271,7 @@ npxprobe(dvp)
static int
npxprobe1(dvp)
- struct pc98_device *dvp;
+ struct isa_device *dvp;
{
u_short control;
u_short status;
@@ -406,7 +392,7 @@ npxprobe1(dvp)
*/
int
npxattach(dvp)
- struct pc98_device *dvp;
+ struct isa_device *dvp;
{
if (npx_ex16)
printf("npx%d: Exception 16 interface\n", dvp->id_unit);
diff --git a/sys/pc98/pc98/pc98.c b/sys/pc98/pc98/pc98.c
index 2ce956e..e213ce0 100644
--- a/sys/pc98/pc98/pc98.c
+++ b/sys/pc98/pc98/pc98.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: pc98.c,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
+ * $Id: pc98.c,v 1.2 1996/07/23 07:46:28 asami Exp $
*/
/*
@@ -50,7 +50,7 @@
/*
* modified for PC9801 by A.Kojima F.Ukai M.Ishii
* Kyoto University Microcomputer Club (KMC)
- * $Id: pc98.c,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
+ * $Id: pc98.c,v 1.2 1996/07/23 07:46:28 asami Exp $
*/
#include "opt_auto_eoi.h"
@@ -157,17 +157,16 @@ static inthand_t *slowintr[ICU_LEN] = {
};
#ifdef PC98
-static void config_pc98dev __P((struct pc98_device *isdp, u_int *mp));
-static void config_pc98dev_c __P((struct pc98_device *isdp, u_int *mp,
+static void config_pc98dev __P((struct isa_device *isdp, u_int *mp));
+static void config_pc98dev_c __P((struct isa_device *isdp, u_int *mp,
int reconfig));
-static void conflict __P((struct pc98_device *dvp, struct pc98_device *tmpdvp,
+static void conflict __P((struct isa_device *dvp, struct isa_device *tmpdvp,
int item, char const *whatnot, char const *reason,
char const *format));
-static int haveseen __P((struct pc98_device *dvp, struct pc98_device *tmpdvp,
+static int haveseen __P((struct isa_device *dvp, struct isa_device *tmpdvp,
u_int checkbits));
static int pc98_dmarangecheck __P((caddr_t va, u_int length, int chan));
static inthand2_t pc98_strayintr;
-static void register_imask __P((struct pc98_device *dvp, u_int mask));
#else
static void config_isadev __P((struct isa_device *isdp, u_int *mp));
static void config_isadev_c __P((struct isa_device *isdp, u_int *mp,
@@ -179,21 +178,16 @@ static int haveseen __P((struct isa_device *dvp, struct isa_device *tmpdvp,
u_int checkbits));
static int isa_dmarangecheck __P((caddr_t va, u_int length, int chan));
static inthand2_t isa_strayintr;
-static void register_imask __P((struct isa_device *dvp, u_int mask));
#endif
+static void register_imask __P((struct isa_device *dvp, u_int mask));
/*
* print a conflict message
*/
static void
conflict(dvp, tmpdvp, item, whatnot, reason, format)
-#ifdef PC98
- struct pc98_device *dvp;
- struct pc98_device *tmpdvp;
-#else
struct isa_device *dvp;
struct isa_device *tmpdvp;
-#endif
int item;
char const *whatnot;
char const *reason;
@@ -212,8 +206,8 @@ conflict(dvp, tmpdvp, item, whatnot, reason, format)
*/
static int
haveseen(dvp, tmpdvp, checkbits)
- struct pc98_device *dvp;
- struct pc98_device *tmpdvp;
+ struct isa_device *dvp;
+ struct isa_device *tmpdvp;
u_int checkbits;
{
/*
@@ -288,10 +282,10 @@ haveseen(dvp, tmpdvp, checkbits)
*/
int
haveseen_pc98dev(dvp, checkbits)
- struct pc98_device *dvp;
+ struct isa_device *dvp;
u_int checkbits;
{
- struct pc98_device *tmpdvp;
+ struct isa_device *tmpdvp;
int status = 0;
for (tmpdvp = pc98_devtab_tty; tmpdvp->id_driver; tmpdvp++) {
@@ -322,7 +316,7 @@ haveseen_pc98dev(dvp, checkbits)
*/
void
pc98_configure() {
- struct pc98_device *dvp;
+ struct isa_device *dvp;
dev_attach(&kdc_nec0);
@@ -408,7 +402,7 @@ pc98_configure() {
static void
config_pc98dev(isdp, mp)
- struct pc98_device *isdp;
+ struct isa_device *isdp;
u_int *mp;
{
config_pc98dev_c(isdp, mp, 0);
@@ -416,7 +410,7 @@ config_pc98dev(isdp, mp)
void
reconfig_pc98dev(isdp, mp)
- struct pc98_device *isdp;
+ struct isa_device *isdp;
u_int *mp;
{
config_pc98dev_c(isdp, mp, 1);
@@ -424,14 +418,14 @@ reconfig_pc98dev(isdp, mp)
static void
config_pc98dev_c(isdp, mp, reconfig)
- struct pc98_device *isdp;
+ struct isa_device *isdp;
u_int *mp;
int reconfig;
{
u_int checkbits;
int id_alive;
int last_alive;
- struct pc98_driver *dp = isdp->id_driver;
+ struct isa_driver *dp = isdp->id_driver;
if (!isdp->id_enabled) {
printf("%s%d: disabled, not probed.\n",
@@ -552,7 +546,7 @@ config_pc98dev_c(isdp, mp, reconfig)
* hw.devconf interface.
*/
int
-pc98_externalize(struct pc98_device *id, struct sysctl_req *req)
+pc98_externalize(struct isa_device *id, struct sysctl_req *req)
{
return (SYSCTL_OUT(req, id, sizeof *id));
}
@@ -563,9 +557,9 @@ pc98_externalize(struct pc98_device *id, struct sysctl_req *req)
* what the `internalize' routine is supposed to do.
*/
int
-pc98_internalize(struct pc98_device *id, struct sysctl_req *req)
+pc98_internalize(struct isa_device *id, struct sysctl_req *req)
{
- struct pc98_device myid;
+ struct isa_device myid;
int rv;
rv = SYSCTL_IN(req, &myid, sizeof *id);
@@ -1031,15 +1025,11 @@ pc98_strayintr(d)
*
* XXX we should add capability flags IAMDISPLAY and ISUPPORTCONSOLES.
*/
-#ifdef PC98
-struct pc98_device *
-#else
struct isa_device *
-#endif
find_display()
{
#ifdef PC98
- struct pc98_device *dvp;
+ struct isa_device *dvp;
for (dvp = pc98_devtab_tty; dvp->id_driver != NULL; dvp++)
#else
@@ -1062,9 +1052,9 @@ find_display()
*
*/
-struct pc98_device *find_pc98dev(table, driverp, unit)
- struct pc98_device *table;
- struct pc98_driver *driverp;
+struct isa_device *find_pc98dev(table, driverp, unit)
+ struct isa_device *table;
+ struct isa_driver *driverp;
int unit;
{
if (driverp == NULL) /* sanity check */
@@ -1085,7 +1075,7 @@ struct pc98_device *find_pc98dev(table, driverp, unit)
*/
int
pc98_irq_pending(dvp)
- struct pc98_device *dvp;
+ struct isa_device *dvp;
{
unsigned id_irq;
@@ -1175,7 +1165,7 @@ register_intr(intr, device_id, flags, handler, maskptr, unit)
static void
register_imask(dvp, mask)
- struct pc98_device *dvp;
+ struct isa_device *dvp;
u_int mask;
{
if (dvp->id_alive && dvp->id_irq) {
diff --git a/sys/pc98/pc98/pc98_device.h b/sys/pc98/pc98/pc98_device.h
index 3285e92..d242e79 100644
--- a/sys/pc98/pc98/pc98_device.h
+++ b/sys/pc98/pc98/pc98_device.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
- * $Id: isa_device.h,v 1.29 1996/04/08 19:38:57 smpatel Exp $
+ * $Id: pc98_device.h,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
*/
#ifndef _PC98_PC98_PC98_DEVICE_H_
@@ -76,9 +76,9 @@ typedef void inthand2_t __P((int unit));
* more powerful mechanism for detecting and dealing with multiple types
* of non-fatal conflict. -jkh XXX
*/
-struct pc98_device {
+struct isa_device {
int id_id; /* device id */
- struct pc98_driver *id_driver;
+ struct isa_driver *id_driver;
int id_iobase; /* base i/o address */
u_short id_irq; /* interrupt request */
short id_drq; /* DMA request */
@@ -94,7 +94,7 @@ struct pc98_device {
int id_reconfig; /* hot eject device support (such as PCMCIA) */
int id_enabled; /* is device enabled */
int id_conflicts; /* we're allowed to conflict with things */
- struct pc98_device *id_next; /* used in isa_devlist in userconfig() */
+ struct isa_device *id_next; /* used in isa_devlist in userconfig() */
};
/*
@@ -104,16 +104,16 @@ struct pc98_device {
* as well as an array of types which are acceptable to it.
* These are used at boot time by the configuration program.
*/
-struct pc98_driver {
- int (*probe) __P((struct pc98_device *idp));
+struct isa_driver {
+ int (*probe) __P((struct isa_device *idp));
/* test whether device is present */
- int (*attach) __P((struct pc98_device *idp));
+ int (*attach) __P((struct isa_device *idp));
/* setup driver for a device */
char *name; /* device name */
int sensitive_hw; /* true if other probes confuse us */
};
-#define PC98_EXTERNALLEN (sizeof(struct pc98_device))
+#define PC98_EXTERNALLEN (sizeof(struct isa_device))
#ifdef KERNEL
@@ -125,12 +125,12 @@ extern inthand2_t *intr_handler[]; /* C entry points of intr handlers */
extern u_int intr_mask[]; /* sets of intrs masked during handling of 1 */
extern int intr_unit[]; /* cookies to pass to intr handlers */
-extern struct pc98_device pc98_biotab_fdc[];
-extern struct pc98_device pc98_biotab_wdc[];
-extern struct pc98_device pc98_devtab_bio[];
-extern struct pc98_device pc98_devtab_net[];
-extern struct pc98_device pc98_devtab_null[];
-extern struct pc98_device pc98_devtab_tty[];
+extern struct isa_device pc98_biotab_fdc[];
+extern struct isa_device pc98_biotab_wdc[];
+extern struct isa_device pc98_devtab_bio[];
+extern struct isa_device pc98_devtab_net[];
+extern struct isa_device pc98_devtab_null[];
+extern struct isa_device pc98_devtab_tty[];
extern struct kern_devconf kdc_nec0;
struct kern_devconf;
@@ -151,12 +151,12 @@ inthand_t
IDTVEC(intr8), IDTVEC(intr9), IDTVEC(intr10), IDTVEC(intr11),
IDTVEC(intr12), IDTVEC(intr13), IDTVEC(intr14), IDTVEC(intr15);
-struct pc98_device *
+struct isa_device *
find_display __P((void));
-struct pc98_device *
- find_pc98dev __P((struct pc98_device *table, struct pc98_driver *driverp,
+struct isa_device *
+ find_pc98dev __P((struct isa_device *table, struct isa_driver *driverp,
int unit));
-int haveseen_pc98dev __P((struct pc98_device *dvp, u_int checkbits));
+int haveseen_pc98dev __P((struct isa_device *dvp, u_int checkbits));
void pc98_configure __P((void));
void pc98_defaultirq __P((void));
void pc98_dmacascade __P((int chan));
@@ -165,13 +165,13 @@ void pc98_dmainit __P((int chan, u_int bouncebufsize));
void pc98_dmastart __P((int flags, caddr_t addr, u_int nbytes, int chan));
int pc98_dma_acquire __P((int chan));
void pc98_dma_release __P((int chan));
-int pc98_externalize __P((struct pc98_device *id, struct sysctl_req *req));
+int pc98_externalize __P((struct isa_device *id, struct sysctl_req *req));
int pc98_generic_externalize __P((struct kern_devconf *kdc,
struct sysctl_req *req));
-int pc98_internalize __P((struct pc98_device *id, struct sysctl_req *req));
-int pc98_irq_pending __P((struct pc98_device *dvp));
+int pc98_internalize __P((struct isa_device *id, struct sysctl_req *req));
+int pc98_irq_pending __P((struct isa_device *dvp));
int pc98_nmi __P((int cd));
-void reconfig_pc98dev __P((struct pc98_device *isdp, u_int *mp));
+void reconfig_pc98dev __P((struct isa_device *isdp, u_int *mp));
int register_intr __P((int intr, int device_id, u_int flags,
inthand2_t *handler, u_int *maskptr, int unit));
int unregister_intr __P((int intr, inthand2_t *handler));
diff --git a/sys/pc98/pc98/pcaudio.c b/sys/pc98/pc98/pcaudio.c
index 8971f9c..4e02cb2 100644
--- a/sys/pc98/pc98/pcaudio.c
+++ b/sys/pc98/pc98/pcaudio.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pcaudio.c,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
+ * $Id: pcaudio.c,v 1.2 1996/07/23 07:46:29 asami Exp $
*/
#include "pca.h"
@@ -98,19 +98,10 @@ static int pca_sleep = 0;
static int pca_initialized = 0;
void pcaintr(struct clockframe *frame);
-#ifdef PC98
-static int pcaprobe(struct pc98_device *dvp);
-static int pcaattach(struct pc98_device *dvp);
-#else
static int pcaprobe(struct isa_device *dvp);
static int pcaattach(struct isa_device *dvp);
-#endif
-#ifdef PC98
-struct pc98_driver pcadriver = {
-#else
struct isa_driver pcadriver = {
-#endif
pcaprobe, pcaattach, "pca",
};
@@ -299,11 +290,7 @@ pca_wait(void)
static int
-#ifdef PC98
-pcaprobe(struct pc98_device *dvp)
-#else
pcaprobe(struct isa_device *dvp)
-#endif
{
return(-1);
}
@@ -327,11 +314,7 @@ static struct kern_devconf kdc_pca[NPCA] = { {
static inline void
-#ifdef PC98
-pca_registerdev(struct pc98_device *id)
-#else
pca_registerdev(struct isa_device *id)
-#endif
{
if(id->id_unit)
kdc_pca[id->id_unit] = kdc_pca[0];
@@ -346,11 +329,7 @@ pca_registerdev(struct isa_device *id)
static int
-#ifdef PC98
-pcaattach(struct pc98_device *dvp)
-#else
pcaattach(struct isa_device *dvp)
-#endif
{
printf("pca%d: PC speaker audio driver\n", dvp->id_unit);
pca_init();
diff --git a/sys/pc98/pc98/sbic55.c b/sys/pc98/pc98/sbic55.c
index dee18e3..c990320 100644
--- a/sys/pc98/pc98/sbic55.c
+++ b/sys/pc98/pc98/sbic55.c
@@ -164,9 +164,9 @@ struct sbic_data {
struct sbic_data *sbicdata[NSBIC];;
static struct sbic_ccb *sbic_get_ccb(struct sbic_data *, int);
-static int sbicprobe(struct pc98_device *);
+static int sbicprobe(struct isa_device *);
static void sbic_done(struct sbic_data *, struct sbic_ccb *);
-static int sbicattach(struct pc98_device *);
+static int sbicattach(struct isa_device *);
static int32_t sbic_scsi_cmd(struct scsi_xfer *xs);
static u_int32_t sbic_adapter_info(int);
static void sbicminphys(struct buf *);
@@ -201,7 +201,7 @@ static struct scsi_device sbic_dev = {
{ 0, 0 }
};
-struct pc98_driver sbicdriver = {
+struct isa_driver sbicdriver = {
sbicprobe,
sbicattach,
"sbic"
@@ -219,7 +219,7 @@ static struct kern_devconf kdc_sbic[NSBIC] = { {
} };
static inline void
-sbic_registerdev(struct pc98_device *id)
+sbic_registerdev(struct isa_device *id)
{
if(id->id_unit)
kdc_sbic[id->id_unit] = kdc_sbic[0];
@@ -239,7 +239,7 @@ static int sbicunit = 0;
* autoconf.c
*/
static int
-sbicprobe(struct pc98_device *dev)
+sbicprobe(struct isa_device *dev)
{
int unit = sbicunit;
struct sbic_data *sbic;
@@ -327,7 +327,7 @@ sbicprobe(struct pc98_device *dev)
* Attach all the sub-devices we can find.
*/
static int
-sbicattach(struct pc98_device *dev)
+sbicattach(struct isa_device *dev)
{
int unit = dev->id_unit;
struct sbic_data *sbic = sbicdata[unit];
diff --git a/sys/pc98/pc98/sbic55.c.new b/sys/pc98/pc98/sbic55.c.new
index ccc3cb3..3c82c1e 100644
--- a/sys/pc98/pc98/sbic55.c.new
+++ b/sys/pc98/pc98/sbic55.c.new
@@ -115,8 +115,8 @@ static struct sbic_softc *sbicdata[NSBIC];
#define KVTOPHYS(x) vtophys(x)
-static int sbicprobe __P((struct pc98_device *));
-static int sbicattach __P((struct pc98_device *));
+static int sbicprobe __P((struct isa_device *));
+static int sbicattach __P((struct isa_device *));
static u_int32_t sbic_adapter_info __P((int));
static int sbic_find __P((struct sbic_softc *));
@@ -202,7 +202,7 @@ struct scsi_device sbic_dev = {
, { 0, 0 }
};
-struct pc98_driver sbicdriver = {
+struct isa_driver sbicdriver = {
sbicprobe,
sbicattach,
"sbic"
@@ -222,7 +222,7 @@ static struct kern_devconf kdc_sbic[NSBIC] = { {
} };
static inline void
-sbic_registerdev(struct pc98_device *id)
+sbic_registerdev(struct isa_device *id)
{
if(id->id_unit)
kdc_sbic[id->id_unit] = kdc_sbic[0];
@@ -239,7 +239,7 @@ sbic_registerdev(struct pc98_device *id)
*/
static int
sbicprobe(dev)
- struct pc98_device *dev;
+ struct isa_device *dev;
{
int unit = sbicunit;
struct sbic_softc *sbic;
@@ -292,7 +292,7 @@ sbicprobe(dev)
*/
static int
sbicattach(dev)
- struct pc98_device *dev;
+ struct isa_device *dev;
{
int unit = dev->id_unit;
struct sbic_softc *sbic = sbicdata[unit];
diff --git a/sys/pc98/pc98/scd.c b/sys/pc98/pc98/scd.c
index afc7615..22e5971 100644
--- a/sys/pc98/pc98/scd.c
+++ b/sys/pc98/pc98/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.2 1996/07/23 07:46:37 asami Exp $ */
+/* $Id: scd.c,v 1.3 1996/07/30 18:56:08 asami Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -187,15 +187,9 @@ static int scd_toc_header(int unit, struct ioc_toc_header *th);
static int scd_toc_entrys(int unit, struct ioc_read_toc_entry *te);
#define SCD_LASTPLUS1 170 /* don't ask, xcdplayer passes this in */
-#ifdef PC98
-static int scd_probe(struct pc98_device *dev);
-static int scd_attach(struct pc98_device *dev);
-struct pc98_driver scddriver = { scd_probe, scd_attach, "scd" };
-#else
static int scd_probe(struct isa_device *dev);
static int scd_attach(struct isa_device *dev);
struct isa_driver scddriver = { scd_probe, scd_attach, "scd" };
-#endif
static d_open_t scdopen;
static d_close_t scdclose;
@@ -227,11 +221,7 @@ static struct kern_devconf kdc_scd[NSCD] = { {
} };
static inline void
-#ifdef PC98
-scd_registerdev(struct pc98_device *id)
-#else
scd_registerdev(struct isa_device *id)
-#endif
{
if(id->id_unit)
kdc_scd[id->id_unit] = kdc_scd[0];
@@ -244,11 +234,7 @@ scd_registerdev(struct isa_device *id)
dev_attach(&kdc_scd[id->id_unit]);
}
-#ifdef PC98
-int scd_attach(struct pc98_device *dev)
-#else
int scd_attach(struct isa_device *dev)
-#endif
{
int unit = dev->id_unit;
struct scd_data *cd = scd_data + unit;
@@ -737,11 +723,7 @@ scd_subchan(int unit, struct ioc_read_subchannel *sc)
}
int
-#ifdef PC98
-scd_probe(struct pc98_device *dev)
-#else
scd_probe(struct isa_device *dev)
-#endif
{
struct sony_drive_configuration drive_config;
int unit = dev->id_unit;
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 66a8d71..461a4e6 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.1.1.1 1996/06/14 10:04:45 asami Exp $
+ * $Id: sio.c,v 1.2 1996/07/23 07:46:38 asami Exp $
*/
#include "opt_comconsole.h"
@@ -375,31 +375,18 @@ void siopoll __P((void));
#define siommap nommap
#define siostrategy nostrategy
-#ifdef PC98
-#ifdef COM_ESP
-static int espattach __P((struct pc98_device *isdp, struct com_s *com,
- Port_t esp_port));
-#endif
-static int sioattach __P((struct pc98_device *dev));
-#else
#ifdef COM_ESP
static int espattach __P((struct isa_device *isdp, struct com_s *com,
Port_t esp_port));
#endif
static int sioattach __P((struct isa_device *dev));
-#endif
static timeout_t siodtrwakeup;
static void comhardclose __P((struct com_s *com));
static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
-#ifdef PC98
-static int sioprobe __P((struct pc98_device *dev));
-static void sioregisterdev __P((struct pc98_device *id));
-#else
static int sioprobe __P((struct isa_device *dev));
static void sioregisterdev __P((struct isa_device *id));
-#endif
static void siosettimeout __P((void));
static void comstart __P((struct tty *tp));
static timeout_t comwakeup;
@@ -417,11 +404,7 @@ static char driver_name[] = "sio";
static struct com_s *p_com_addr[NSIO];
#define com_addr(unit) (p_com_addr[unit])
-#ifdef PC98
-struct pc98_driver siodriver = {
-#else
struct isa_driver siodriver = {
-#endif
sioprobe, sioattach, driver_name
};
@@ -757,11 +740,7 @@ card_intr(struct pccard_dev *dp)
static void
sioregisterdev(id)
-#ifdef PC98
- struct pc98_device *id;
-#else
struct isa_device *id;
-#endif
{
int unit;
@@ -790,25 +769,17 @@ sioregisterdev(id)
static int
sioprobe(dev)
-#ifdef PC98
- struct pc98_device *dev;
-#else
struct isa_device *dev;
-#endif
{
static bool_t already_init;
bool_t failures[10];
int fn;
-#ifdef PC98
- struct pc98_device *idev;
-#else
struct isa_device *idev;
-#endif
Port_t iobase;
u_char mcr_image;
int result;
#ifdef PC98
- struct pc98_device *xdev;
+ struct isa_device *xdev;
int irqout=0;
int ret = 0;
int tmp;
@@ -1150,11 +1121,7 @@ espattach(isdp, com, esp_port)
static int
sioattach(isdp)
-#ifdef PC98
- struct pc98_device *isdp;
-#else
struct isa_device *isdp;
-#endif
{
struct com_s *com;
dev_t dev;
diff --git a/sys/pc98/pc98/sound/soundcard.c b/sys/pc98/pc98/sound/soundcard.c
index bc08b2b..77eedc7 100644
--- a/sys/pc98/pc98/sound/soundcard.c
+++ b/sys/pc98/pc98/sound/soundcard.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: soundcard.c,v 1.42 1996/03/28 14:31:13 scrappy Exp $
+ * $Id: soundcard.c,v 1.1.1.1 1996/06/14 10:04:54 asami Exp $
*/
#include "sound_config.h"
@@ -67,13 +67,8 @@ static void * sndstat_devfs_token;
struct selinfo selinfo[SND_NDEVS >> 4];
-#ifdef PC98
-static int sndprobe (struct pc98_device *dev);
-static int sndattach (struct pc98_device *dev);
-#else
static int sndprobe (struct isa_device *dev);
static int sndattach (struct isa_device *dev);
-#endif
static void sound_mem_init(void);
static d_open_t sndopen;
@@ -89,20 +84,6 @@ static struct cdevsw snd_cdevsw =
sndioctl, nostop, nullreset, nodevtotty,/* sound */
sndselect, nommap, NULL, "snd", NULL, -1 };
-#ifdef PC98
-struct pc98_driver opldriver = {sndprobe, sndattach, "opl"};
-struct pc98_driver sbdriver = {sndprobe, sndattach, "sb"};
-struct pc98_driver sbxvidriver = {sndprobe, sndattach, "sbxvi"};
-struct pc98_driver sbmididriver = {sndprobe, sndattach, "sbmidi"};
-struct pc98_driver pasdriver = {sndprobe, sndattach, "pas"};
-struct pc98_driver mpudriver = {sndprobe, sndattach, "mpu"};
-struct pc98_driver gusdriver = {sndprobe, sndattach, "gus"};
-struct pc98_driver gusxvidriver = {sndprobe, sndattach, "gusxvi"};
-struct pc98_driver gusmaxdriver = {sndprobe, sndattach, "gusmax"};
-struct pc98_driver uartdriver = {sndprobe, sndattach, "uart"};
-struct pc98_driver mssdriver = {sndprobe, sndattach, "mss"};
-struct pc98_driver pcmdriver = {sndprobe, sndattach, "pcm"};
-#else
struct isa_driver opldriver = {sndprobe, sndattach, "opl"};
struct isa_driver sbdriver = {sndprobe, sndattach, "sb"};
struct isa_driver sbxvidriver = {sndprobe, sndattach, "sbxvi"};
@@ -114,6 +95,8 @@ struct isa_driver gusxvidriver = {sndprobe, sndattach, "gusxvi"};
struct isa_driver gusmaxdriver = {sndprobe, sndattach, "gusmax"};
struct isa_driver uartdriver = {sndprobe, sndattach, "uart"};
struct isa_driver mssdriver = {sndprobe, sndattach, "mss"};
+#ifdef PC98
+struct isa_driver pcmdriver = {sndprobe, sndattach, "pcm"};
#endif
static unsigned short
@@ -124,11 +107,7 @@ adintr(INT_HANDLER_PARMS(unit,dummy))
{
#ifndef EXCLUDE_AD1848
static short unit_to_irq[4] = { -1, -1, -1, -1 };
-#ifdef PC98
- struct pc98_device *dev;
-#else
struct isa_device *dev;
-#endif
if (unit_to_irq [unit] > 0)
ad1848_interrupt(INT_HANDLER_CALL (unit_to_irq [unit]));
@@ -282,11 +261,7 @@ ipri_to_irq (unsigned short ipri)
}
static int
-#ifdef PC98
-driver_to_voxunit(struct pc98_driver *driver)
-#else
driver_to_voxunit(struct isa_driver *driver)
-#endif
{
/* converts a sound driver pointer into the equivalent
VoxWare device unit number */
@@ -326,11 +301,7 @@ driver_to_voxunit(struct isa_driver *driver)
}
static int
-#ifdef PC98
-sndprobe (struct pc98_device *dev)
-#else
sndprobe (struct isa_device *dev)
-#endif
{
struct address_info hw_config;
int unit;
@@ -361,11 +332,7 @@ sndprobe (struct isa_device *dev)
}
static int
-#ifdef PC98
-sndattach (struct pc98_device *dev)
-#else
sndattach (struct isa_device *dev)
-#endif
{
int unit;
static int midi_initialized = 0;
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c
index e12f1d0..35ba376 100644
--- a/sys/pc98/pc98/syscons.c
+++ b/sys/pc98/pc98/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.2 1996/07/23 07:46:41 asami Exp $
+ * $Id: syscons.c,v 1.3 1996/08/30 10:43:09 asami Exp $
*/
#include "sc.h"
@@ -168,7 +168,7 @@ struct tty *sccons[MAXCONS+1];
#define VIRTUAL_TTY(x) &sccons[x]
#define CONSOLE_TTY &sccons[MAXCONS]
static struct tty sccons[MAXCONS+1];
-static int nsccons = MAXCONS; /* for pstat only */
+static const int nsccons = MAXCONS+1;
#endif
#ifdef PC98
@@ -191,17 +191,9 @@ u_short *Crtat;
#endif
/* prototypes */
-#ifdef PC98
-static int scattach(struct pc98_device *dev);
-#else
static int scattach(struct isa_device *dev);
-#endif
static int scparam(struct tty *tp, struct termios *t);
-#ifdef PC98
-static int scprobe(struct pc98_device *dev);
-#else
static int scprobe(struct isa_device *dev);
-#endif
static void scstart(struct tty *tp);
static void scinit(void);
static u_int scgetc(int noblock);
@@ -240,11 +232,7 @@ static void save_palette(void);
static void do_bell(scr_stat *scp, int pitch, int duration);
static void blink_screen(scr_stat *scp);
-#ifdef PC98
-struct pc98_driver scdriver = {
-#else
struct isa_driver scdriver = {
-#endif
scprobe, scattach, "sc", 1
};
@@ -409,11 +397,7 @@ move_crsr(scr_stat *scp, int x, int y)
}
static int
-#ifdef PC98
-scprobe(struct pc98_device *dev)
-#else
scprobe(struct isa_device *dev)
-#endif
{
#ifdef PC98
return(16);
@@ -491,11 +475,7 @@ static struct kern_devconf kdc_sc[NSC] = {
};
static inline void
-#ifdef PC98
-sc_registerdev(struct pc98_device *id)
-#else
sc_registerdev(struct isa_device *id)
-#endif
{
if(id->id_unit)
kdc_sc[id->id_unit] = kdc_sc[0];
@@ -522,11 +502,7 @@ scresume(void *dummy)
#endif
static int
-#ifdef PC98
-scattach(struct pc98_device *dev)
-#else
scattach(struct isa_device *dev)
-#endif
{
scr_stat *scp;
#ifdef DEVFS
@@ -1571,11 +1547,7 @@ scstart(struct tty *tp)
void
sccnprobe(struct consdev *cp)
{
-#ifdef PC98
- struct pc98_device *dvp;
-#else
struct isa_device *dvp;
-#endif
/*
* Take control if we are the highest priority enabled display device.
diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c
index a81b7b8..12f1199 100644
--- a/sys/pc98/pc98/wd.c
+++ b/sys/pc98/pc98/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.3 1996/07/30 18:56:10 asami Exp $
+ * $Id: wd.c,v 1.4 1996/08/30 10:43:11 asami Exp $
*/
/* TODO:
@@ -182,11 +182,7 @@ wd_registerdev(int ctlr, int unit)
}
static inline void
-#ifdef PC98
-wdc_registerdev(struct pc98_device *dvp)
-#else
wdc_registerdev(struct isa_device *dvp)
-#endif
{
int unit = dvp->id_unit;
@@ -323,13 +319,8 @@ static short wd_ctlr;
static int old_epson_note;
#endif
-#ifdef PC98
-static int wdprobe(struct pc98_device *dvp);
-static int wdattach(struct pc98_device *dvp);
-#else
static int wdprobe(struct isa_device *dvp);
static int wdattach(struct isa_device *dvp);
-#endif
static void wdustart(struct disk *du);
static int wdcontrol(struct buf *bp);
static int wdcommand(struct disk *du, u_int cylinder, u_int head,
@@ -371,11 +362,7 @@ wd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
return disk_externalize(wddrives[kdc->kdc_unit]->dk_unit, req);
}
-#ifdef PC98
-struct pc98_driver wdcdriver = {
-#else
struct isa_driver wdcdriver = {
-#endif
wdprobe, wdattach, "wdc",
};
@@ -383,7 +370,7 @@ struct isa_driver wdcdriver = {
* Probe for controller.
*/
static int
-wdprobe(struct pc98_device *dvp)
+wdprobe(struct isa_device *dvp)
{
int unit = dvp->id_unit;
struct disk *du;
@@ -527,13 +514,13 @@ nodevice:
* Attach each drive if possible.
*/
static int
-wdattach(struct pc98_device *dvp)
+wdattach(struct isa_device *dvp)
{
#ifdef DEVFS
int mynor;
#endif
int unit, lunit;
- struct pc98_device *wdup;
+ struct isa_device *wdup;
struct disk *du;
if (dvp->id_unit >= NWDC)
OpenPOWER on IntegriCloud