xref: /original-bsd/sys/i386/isa/ic/nec765.h (revision f955cb91)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)nec765.h	7.1 (Berkeley) 05/09/91
8  */
9 
10 /*
11  * Nec 765 floppy disc controller definitions
12  */
13 
14 /* Main status register */
15 #define NE7_DAB	0x01	/* Diskette drive A is seeking, thus busy */
16 #define NE7_DBB	0x02	/* Diskette drive B is seeking, thus busy */
17 #define NE7_CB	0x10	/* Diskette Controller Busy */
18 #define NE7_NDM	0x20	/* Diskette Controller in Non Dma Mode */
19 #define NE7_DIO	0x40	/* Diskette Controller Data register I/O */
20 #define NE7_RQM	0x80	/* Diskette Controller ReQuest for Master */
21 
22 /* Status register ST0 */
23 #define NE7_ST0BITS	"\020\010invalid\007abnormal\006seek complete\005drive check\004drive_rdy\003top head\002unit_sel1\001unit_sel0"
24 
25 /* Status register ST1 */
26 #define NE7_ST1BITS	"\020\010end_of_cyl\006bad_crc\005data_overrun\003sec_not_fnd\002write_protect\001no_am"
27 
28 /* Status register ST2 */
29 #define NE7_ST2BITS	"\020\007control_mark\006bad_crc\005wrong_cyl\004scan_equal\003scan_not_found\002bad_cyl\001no_dam"
30 
31 /* Status register ST3 */
32 #define NE7_ST3BITS	"\020\010fault\007write_protect\006drdy\005tk0\004two_side\003side_sel\002unit_sel1\0012unit_sel0"
33 
34 /* Commands */
35 #define NE7CMD_SENSED	2	/*  sense drive - requires unit select byte */
36 #define NE7CMD_SPECIFY	3	/*  specify drive parameters - requires unit
37 					parameters byte */
38 #define NE7CMD_WRITE	5	/*  write - requires eight additional bytes */
39 #define NE7CMD_READ	6	/*  read - requires eight additional bytes */
40 #define NE7CMD_RECAL	7	/*  recalibrate drive - requires
41 					unit select byte */
42 #define NE7CMD_SENSEI	8	/*  sense controller interrupt status */
43 #define NE7CMD_SEEK	15	/*  seek drive - requires unit select byte
44 					and new cyl byte */
45