xref: /netbsd-src/sys/arch/arc/jazz/fdreg.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: fdreg.h,v 1.4 2005/12/11 12:16:39 christos Exp $	*/
2459f2585Sur /*	$OpenBSD: fdreg.h,v 1.1.1.1 1996/06/24 09:07:19 pefo Exp $	*/
3459f2585Sur /*	NetBSD: fdreg.h,v 1.8 1995/06/28 04:30:57 cgd Exp 	*/
4459f2585Sur 
5459f2585Sur /*-
6459f2585Sur  * Copyright (c) 1991 The Regents of the University of California.
7459f2585Sur  * All rights reserved.
8459f2585Sur  *
9459f2585Sur  * Redistribution and use in source and binary forms, with or without
10459f2585Sur  * modification, are permitted provided that the following conditions
11459f2585Sur  * are met:
12459f2585Sur  * 1. Redistributions of source code must retain the above copyright
13459f2585Sur  *    notice, this list of conditions and the following disclaimer.
14459f2585Sur  * 2. Redistributions in binary form must reproduce the above copyright
15459f2585Sur  *    notice, this list of conditions and the following disclaimer in the
16459f2585Sur  *    documentation and/or other materials provided with the distribution.
17aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
18459f2585Sur  *    may be used to endorse or promote products derived from this software
19459f2585Sur  *    without specific prior written permission.
20459f2585Sur  *
21459f2585Sur  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22459f2585Sur  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23459f2585Sur  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24459f2585Sur  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25459f2585Sur  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26459f2585Sur  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27459f2585Sur  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28459f2585Sur  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29459f2585Sur  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30459f2585Sur  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31459f2585Sur  * SUCH DAMAGE.
32459f2585Sur  *
33459f2585Sur  *	@(#)fdreg.h	7.1 (Berkeley) 5/9/91
34459f2585Sur  */
35459f2585Sur 
36459f2585Sur /*
37459f2585Sur  * AT floppy controller registers and bitfields
38459f2585Sur  */
39459f2585Sur 
40459f2585Sur /* uses NEC765 controller */
41459f2585Sur #include <dev/ic/nec765reg.h>
42459f2585Sur 
43459f2585Sur /* registers */
4494bba098Ssoda #define	FDOUT	0	/* Digital Output Register (W) */
45459f2585Sur #define	FDO_FDSEL	0x03	/*  floppy device select */
46459f2585Sur #define	FDO_FRST	0x04	/*  floppy controller reset */
47459f2585Sur #define	FDO_FDMAEN	0x08	/*  enable floppy DMA and Interrupt */
48459f2585Sur #define	FDO_MOEN(n)	((1 << n) * 0x10)	/* motor enable */
49459f2585Sur 
5094bba098Ssoda #define	FDSTS	2	/* NEC 765 Main Status Register (R) */
5194bba098Ssoda #define	FDDATA	3	/* NEC 765 Data Register (R/W) */
52459f2585Sur 
5394bba098Ssoda #define	FDCTL	5	/* Control Register (W) */
54459f2585Sur #define	FDC_500KBPS	0x00	/* 500KBPS MFM drive transfer rate */
55459f2585Sur #define	FDC_300KBPS	0x01	/* 300KBPS MFM drive transfer rate */
56459f2585Sur #define	FDC_250KBPS	0x02	/* 250KBPS MFM drive transfer rate */
57459f2585Sur #define	FDC_125KBPS	0x03	/* 125KBPS FM drive transfer rate */
58459f2585Sur 
5994bba098Ssoda #define	FDIN	5	/* Digital Input Register (R) */
60459f2585Sur #define	FDI_DCHG	0x80	/* diskette has been changed */
61459f2585Sur 
62459f2585Sur #define	FDC_BSIZE	512
6394bba098Ssoda #if 0
64459f2585Sur #define	FDC_NPORT	8
6594bba098Ssoda #endif
66