summaryrefslogtreecommitdiffstats
path: root/sys/isa/fdreg.h
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-09-17 16:56:10 +0000
committerdg <dg@FreeBSD.org>1994-09-17 16:56:10 +0000
commit0285e6bafcab4b972c40c1d78ac266295dc5d80f (patch)
tree04e7afb126a8687648474c1e093925c58ebecf67 /sys/isa/fdreg.h
parent2097dca3f5f4524ecf441dae533fcf5ee46c98c2 (diff)
downloadFreeBSD-src-0285e6bafcab4b972c40c1d78ac266295dc5d80f.zip
FreeBSD-src-0285e6bafcab4b972c40c1d78ac266295dc5d80f.tar.gz
Updated driver to the 1.1.5 version:
date: 1994/05/22 12:35:38; author: joerg; state: Exp; lines: +6 -6 First round of floppy changes. Try making `fd' more robust. New features: . ioctl command for setting the drive type (density etc.); restricted to the super-user . ioctl for getting/seting `drive options'; currently only option is FDOPT_NORETRY: inhibit the usual retries; used when verifying a newly formatted track Fixes: . function prototypes . made all internal functions `static' . cleaned up & corrected .h files . restructured, to make the chaotic function sequence more rational . compiled with -Wall, and cleared all warnings . introduced a mirror for the (write-only) `digital output register', to avoid the current kludge . device probing completed by seeking/recalibrating, and looking for track 0 being found . holding the controller down in reset state while it is idle (and thus saving allot of headaches) . make requests fail that are not a multiple of the (physical) sector size . removed the fixed physical sector size (512 bytes), allowing for any size the controller could handle (128/256/512/1024 bytes) . replaced some silly messages . fixed the TRACE* macro usage, debugging reports should be complete now again (debugging output is HUGE! though) . removed fd_timeout for SEEK command; seeks are always reported by the controller to succeed, since the `success' only refers to the controller's idea of success - there is no hardware line to tell about the seek end (other than the `track 0' line) . catch SENSEI's that report about a `terminated due to READY changed' status - could happen after a controller reset . converted ``hz / <something>'' divide operations to divisors that are powers of two, so gcc can optimize them into shifts . write/format operations are checked against a write-protected medium now *prior* starting the operation . error reports of `invalid command' and `wrong cylinder' will cause shortcuts in the retrier() now . fixed a bug in the retrier() causing bogus block numbers to be reported . fdformat() does care for errors now Known Bugs: . no attempts have been made (yet) to improve the performance . sometimes, bogus ``seek/recalib failed'' messages are logged; this is still a bug in the driver, but it's not harmful since it's usually caught by the retrier() Reviewed by: Submitted by: Obtained from:
Diffstat (limited to 'sys/isa/fdreg.h')
-rw-r--r--sys/isa/fdreg.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/isa/fdreg.h b/sys/isa/fdreg.h
index d0d69e2..ad5c344 100644
--- a/sys/isa/fdreg.h
+++ b/sys/isa/fdreg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)fdreg.h 7.1 (Berkeley) 5/9/91
- * $Id: fdreg.h,v 1.4 1994/02/07 22:12:42 alm Exp $
+ * $Id: fdreg.h,v 1.5 1994/08/13 03:49:58 wollman Exp $
*/
/*
@@ -42,24 +42,26 @@
#include <i386/isa/ic/nec765.h>
/* registers */
-#define fdout 2 /* Digital Output Register (W) */
+#define FDOUT 2 /* Digital Output Register (W) */
#define FDO_FDSEL 0x03 /* floppy device select */
#define FDO_FRST 0x04 /* floppy controller reset */
#define FDO_FDMAEN 0x08 /* enable floppy DMA and Interrupt */
#define FDO_MOEN0 0x10 /* motor enable drive 0 */
#define FDO_MOEN1 0x20 /* motor enable drive 1 */
-#define FDO_MOEN2 0x30 /* motor enable drive 2 */
-#define FDO_MOEN3 0x40 /* motor enable drive 3 */
+#define FDO_MOEN2 0x40 /* motor enable drive 2 */
+#define FDO_MOEN3 0x80 /* motor enable drive 3 */
-#define fdsts 4 /* NEC 765 Main Status Register (R) */
-#define fddata 5 /* NEC 765 Data Register (R/W) */
+#define FDSTS 4 /* NEC 765 Main Status Register (R) */
+#define FDDATA 5 /* NEC 765 Data Register (R/W) */
-#define fdctl 7 /* Control Register (W) */
+#define FDCTL 7 /* Control Register (W) */
#define FDC_500KBPS 0x00 /* 500KBPS MFM drive transfer rate */
#define FDC_300KBPS 0x01 /* 300KBPS MFM drive transfer rate */
#define FDC_250KBPS 0x02 /* 250KBPS MFM drive transfer rate */
#define FDC_125KBPS 0x03 /* 125KBPS FM drive transfer rate */
+ /* for some controllers 1MPBS instead */
-#define fdin 7 /* Digital Input Register (R) */
+#define FDIN 7 /* Digital Input Register (R) */
#define FDI_DCHG 0x80 /* diskette has been changed */
-
+ /* requires drive and motor being selected */
+ /* is cleared by any step pulse to drive */
OpenPOWER on IntegriCloud