aboutsummaryrefslogtreecommitdiff
path: root/sys/pc98
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1997-09-17 08:01:07 +0000
committerKATO Takenori <kato@FreeBSD.org>1997-09-17 08:01:07 +0000
commit61fd9882c105d224e989356e2aff60e25c87f058 (patch)
tree625305e72a381f38bea6c8c44652ac2a53920947 /sys/pc98
parent6c9d5885079c3aa3fa9c1d927f39640fec263e41 (diff)
downloadsrc-61fd9882c105d224e989356e2aff60e25c87f058.tar.gz
src-61fd9882c105d224e989356e2aff60e25c87f058.zip
Synchronize with sys/i386/conf/options.i386 and sys/i386/isa/fd.c
revisions 1.59 and 1.101, respectively.
Notes
Notes: svn path=/head/; revision=29533
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/fdc.c31
-rw-r--r--sys/pc98/conf/options.pc985
-rw-r--r--sys/pc98/pc98/fd.c31
3 files changed, 46 insertions, 21 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index 06f54858f626..bdb572a6c3bc 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.19 1997/03/24 12:29:23 bde Exp $
+ * $Id: fd.c,v 1.20 1997/07/21 13:11:02 kato Exp $
*
*/
@@ -52,6 +52,7 @@
#undef NFDC
#endif
#include "fd.h"
+#include "opt_fdc.h"
#if NFDC > 0
@@ -328,7 +329,7 @@ static int fdformat(dev_t, struct fd_formb *, struct proc *);
#define MOTORWAIT 10
#define IOTIMEDOUT 11
-#ifdef DEBUG
+#ifdef FDC_DEBUG
static char const * const fdstates[] =
{
"DEVIDLE",
@@ -349,10 +350,10 @@ static char const * const fdstates[] =
static int volatile fd_debug = 0;
#define TRACE0(arg) if(fd_debug) printf(arg)
#define TRACE1(arg1, arg2) if(fd_debug) printf(arg1, arg2)
-#else /* DEBUG */
+#else /* FDC_DEBUG */
#define TRACE0(arg)
#define TRACE1(arg1, arg2)
-#endif /* DEBUG */
+#endif /* FDC_DEBUG */
/* autoconfig structure */
@@ -780,23 +781,33 @@ fdattach(struct isa_device *dev)
if (ic_type == 0 &&
fd_cmd(fdcu, 1, NE7CMD_VERSION, 1, &ic_type) == 0)
{
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("fdc%d: ", fdcu);
+#endif
ic_type = (u_char)ic_type;
switch( ic_type ) {
case 0x80:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("NEC 765\n");
+#endif
fdc->fdct = FDC_NE765;
break;
case 0x81:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("Intel 82077\n");
+#endif
fdc->fdct = FDC_I82077;
break;
case 0x90:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("NEC 72065B\n");
+#endif
fdc->fdct = FDC_NE72065;
break;
default:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("unknown IC type %02x\n", ic_type);
+#endif
fdc->fdct = FDC_UNKNOWN;
break;
}
@@ -1168,13 +1179,13 @@ in_fdc(fdcu_t fdcu)
return fdc_err(fdcu, "ready for output in input\n");
if (j <= 0)
return fdc_err(fdcu, bootverbose? "input ready timeout\n": 0);
-#ifdef DEBUG
+#ifdef FDC_DEBUG
i = inb(baseport+FDDATA);
TRACE1("[FDDATA->0x%x]", (unsigned char)i);
return(i);
-#else
+#else /* !FDC_DEBUG */
return inb(baseport+FDDATA);
-#endif
+#endif /* FDC_DEBUG */
}
/*
@@ -1191,17 +1202,17 @@ fd_in(fdcu_t fdcu, int *ptr)
return fdc_err(fdcu, "ready for output in input\n");
if (j <= 0)
return fdc_err(fdcu, bootverbose? "input ready timeout\n": 0);
-#ifdef DEBUG
+#ifdef FDC_DEBUG
i = inb(baseport+FDDATA);
TRACE1("[FDDATA->0x%x]", (unsigned char)i);
*ptr = i;
return 0;
-#else
+#else /* !FDC_DEBUG */
i = inb(baseport+FDDATA);
if (ptr)
*ptr = i;
return 0;
-#endif
+#endif /* FDC_DEBUG */
}
int
diff --git a/sys/pc98/conf/options.pc98 b/sys/pc98/conf/options.pc98
index a1ee833229f3..3ba2f80205a9 100644
--- a/sys/pc98/conf/options.pc98
+++ b/sys/pc98/conf/options.pc98
@@ -1,4 +1,4 @@
-# $Id: options.pc98,v 1.37 1997/09/01 10:41:04 kato Exp $
+# $Id: options.pc98,v 1.38 1997/09/05 10:18:16 kato Exp $
BOUNCEPAGES opt_bounce.h
USER_LDT
MATH_EMULATE opt_math_emulate.h
@@ -99,3 +99,6 @@ VISUAL_USERCONFIG opt_userconfig.h
USERCONFIG_BOOT opt_userconfig.h
EISA_SLOTS opt_eisa.h
+
+FDC_DEBUG opt_fdc.h
+FDC_PRINT_BOGUS_CHIPTYPE opt_fdc.h
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index 06f54858f626..bdb572a6c3bc 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.19 1997/03/24 12:29:23 bde Exp $
+ * $Id: fd.c,v 1.20 1997/07/21 13:11:02 kato Exp $
*
*/
@@ -52,6 +52,7 @@
#undef NFDC
#endif
#include "fd.h"
+#include "opt_fdc.h"
#if NFDC > 0
@@ -328,7 +329,7 @@ static int fdformat(dev_t, struct fd_formb *, struct proc *);
#define MOTORWAIT 10
#define IOTIMEDOUT 11
-#ifdef DEBUG
+#ifdef FDC_DEBUG
static char const * const fdstates[] =
{
"DEVIDLE",
@@ -349,10 +350,10 @@ static char const * const fdstates[] =
static int volatile fd_debug = 0;
#define TRACE0(arg) if(fd_debug) printf(arg)
#define TRACE1(arg1, arg2) if(fd_debug) printf(arg1, arg2)
-#else /* DEBUG */
+#else /* FDC_DEBUG */
#define TRACE0(arg)
#define TRACE1(arg1, arg2)
-#endif /* DEBUG */
+#endif /* FDC_DEBUG */
/* autoconfig structure */
@@ -780,23 +781,33 @@ fdattach(struct isa_device *dev)
if (ic_type == 0 &&
fd_cmd(fdcu, 1, NE7CMD_VERSION, 1, &ic_type) == 0)
{
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("fdc%d: ", fdcu);
+#endif
ic_type = (u_char)ic_type;
switch( ic_type ) {
case 0x80:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("NEC 765\n");
+#endif
fdc->fdct = FDC_NE765;
break;
case 0x81:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("Intel 82077\n");
+#endif
fdc->fdct = FDC_I82077;
break;
case 0x90:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("NEC 72065B\n");
+#endif
fdc->fdct = FDC_NE72065;
break;
default:
+#ifdef FDC_PRINT_BOGUS_CHIPTYPE
printf("unknown IC type %02x\n", ic_type);
+#endif
fdc->fdct = FDC_UNKNOWN;
break;
}
@@ -1168,13 +1179,13 @@ in_fdc(fdcu_t fdcu)
return fdc_err(fdcu, "ready for output in input\n");
if (j <= 0)
return fdc_err(fdcu, bootverbose? "input ready timeout\n": 0);
-#ifdef DEBUG
+#ifdef FDC_DEBUG
i = inb(baseport+FDDATA);
TRACE1("[FDDATA->0x%x]", (unsigned char)i);
return(i);
-#else
+#else /* !FDC_DEBUG */
return inb(baseport+FDDATA);
-#endif
+#endif /* FDC_DEBUG */
}
/*
@@ -1191,17 +1202,17 @@ fd_in(fdcu_t fdcu, int *ptr)
return fdc_err(fdcu, "ready for output in input\n");
if (j <= 0)
return fdc_err(fdcu, bootverbose? "input ready timeout\n": 0);
-#ifdef DEBUG
+#ifdef FDC_DEBUG
i = inb(baseport+FDDATA);
TRACE1("[FDDATA->0x%x]", (unsigned char)i);
*ptr = i;
return 0;
-#else
+#else /* !FDC_DEBUG */
i = inb(baseport+FDDATA);
if (ptr)
*ptr = i;
return 0;
-#endif
+#endif /* FDC_DEBUG */
}
int