summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2000-05-11 15:42:00 +0000
committerjdolecek <jdolecek@NetBSD.org>2000-05-11 15:42:00 +0000
commit2185bcc386e6e29032ccfa2d3606dcd26dbe2c50 (patch)
treef9965c54d715df6572a037f8c6487f9123605c08 /sys/dev/isa
parent2d2ad4f3e865d2eb356eedf8edee79226fb5e7aa (diff)
MI part of MicroChannel Architecture bus support
This work is based on code written by Scott D. Telford, the IBM Token Ring card attachment was written by Gregory McGarry. XXX this is still very experimental and development version; use at your XXX own risk
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/fd.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 279e9be2c61..d5894fa8ad5 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.4 2000/05/02 03:32:09 thorpej Exp $ */
+/* $NetBSD: fd.c,v 1.5 2000/05/11 15:42:00 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -141,8 +141,15 @@
#include <dev/isa/fdcvar.h>
#if defined(__i386__)
+
#include <dev/ic/mc146818reg.h> /* for NVRAM access */
#include <i386/isa/nvram.h>
+
+#include "mca.h"
+#if NMCA > 0
+#include <machine/mca_machdep.h> /* for MCA_system */
+#endif
+
#endif /* __i386__ */
#define FDUNIT(dev) (minor(dev) / 8)
@@ -176,6 +183,14 @@ struct fd_type {
char *name;
};
+#if NMCA > 0
+/* MCA - specific entries */
+struct fd_type mca_fd_types[] = {
+ { 18,2,36,2,0xff,0x0f,0x1b,0x6c,80,2880,1,FDC_500KBPS,0xf6,1, "1.44MB" }, /* 1.44MB diskette - XXX try 16ms step rate */
+ { 9,2,18,2,0xff,0x4f,0x2a,0x50,80,1440,1,FDC_250KBPS,0xf6,1, "720KB" }, /* 3.5 inch 720kB diskette - XXX try 24ms step rate */
+};
+#endif /* NMCA > 0 */
+
/* The order of entries in the following table is important -- BEWARE! */
struct fd_type fd_types[] = {
{ 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_500KBPS,0xf6,1, "1.44MB" }, /* 1.44MB diskette */
@@ -472,11 +487,21 @@ fd_nvtotype(fdc, nvraminfo, drive)
case NVRAM_DISKETTE_TYPE6:
/* XXX We really ought to handle 2.88MB format. */
case NVRAM_DISKETTE_144M:
- return &fd_types[0];
+#if NMCA > 0
+ if (MCA_system)
+ return &mca_fd_types[0];
+ else
+#endif /* NMCA > 0 */
+ return &fd_types[0];
case NVRAM_DISKETTE_360K:
return &fd_types[3];
case NVRAM_DISKETTE_720K:
- return &fd_types[4];
+#if NMCA > 0
+ if (MCA_system)
+ return &mca_fd_types[1];
+ else
+#endif /* NMCA > 0 */
+ return &fd_types[4];
default:
printf("%s: drive %d: unknown device type 0x%x\n",
fdc, drive, type);