Home | History | Annotate | Line # | Download | only in jazz
fdreg.h revision 1.1.4.1
      1  1.1.4.1  nathanw /*	$NetBSD: fdreg.h,v 1.1.4.1 2001/06/21 19:18:38 nathanw Exp $	*/
      2      1.1       ur /*	$OpenBSD: fdreg.h,v 1.1.1.1 1996/06/24 09:07:19 pefo Exp $	*/
      3      1.1       ur /*	NetBSD: fdreg.h,v 1.8 1995/06/28 04:30:57 cgd Exp 	*/
      4      1.1       ur 
      5      1.1       ur /*-
      6      1.1       ur  * Copyright (c) 1991 The Regents of the University of California.
      7      1.1       ur  * All rights reserved.
      8      1.1       ur  *
      9      1.1       ur  * Redistribution and use in source and binary forms, with or without
     10      1.1       ur  * modification, are permitted provided that the following conditions
     11      1.1       ur  * are met:
     12      1.1       ur  * 1. Redistributions of source code must retain the above copyright
     13      1.1       ur  *    notice, this list of conditions and the following disclaimer.
     14      1.1       ur  * 2. Redistributions in binary form must reproduce the above copyright
     15      1.1       ur  *    notice, this list of conditions and the following disclaimer in the
     16      1.1       ur  *    documentation and/or other materials provided with the distribution.
     17      1.1       ur  * 3. All advertising materials mentioning features or use of this software
     18      1.1       ur  *    must display the following acknowledgement:
     19      1.1       ur  *	This product includes software developed by the University of
     20      1.1       ur  *	California, Berkeley and its contributors.
     21      1.1       ur  * 4. Neither the name of the University nor the names of its contributors
     22      1.1       ur  *    may be used to endorse or promote products derived from this software
     23      1.1       ur  *    without specific prior written permission.
     24      1.1       ur  *
     25      1.1       ur  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     26      1.1       ur  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     27      1.1       ur  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     28      1.1       ur  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     29      1.1       ur  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     30      1.1       ur  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     31      1.1       ur  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     32      1.1       ur  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     33      1.1       ur  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     34      1.1       ur  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     35      1.1       ur  * SUCH DAMAGE.
     36      1.1       ur  *
     37      1.1       ur  *	@(#)fdreg.h	7.1 (Berkeley) 5/9/91
     38      1.1       ur  */
     39      1.1       ur 
     40      1.1       ur /*
     41      1.1       ur  * AT floppy controller registers and bitfields
     42      1.1       ur  */
     43      1.1       ur 
     44      1.1       ur /* uses NEC765 controller */
     45      1.1       ur #include <dev/ic/nec765reg.h>
     46      1.1       ur 
     47      1.1       ur /* registers */
     48  1.1.4.1  nathanw #define	FDOUT	0	/* Digital Output Register (W) */
     49      1.1       ur #define	FDO_FDSEL	0x03	/*  floppy device select */
     50      1.1       ur #define	FDO_FRST	0x04	/*  floppy controller reset */
     51      1.1       ur #define	FDO_FDMAEN	0x08	/*  enable floppy DMA and Interrupt */
     52      1.1       ur #define	FDO_MOEN(n)	((1 << n) * 0x10)	/* motor enable */
     53      1.1       ur 
     54  1.1.4.1  nathanw #define	FDSTS	2	/* NEC 765 Main Status Register (R) */
     55  1.1.4.1  nathanw #define	FDDATA	3	/* NEC 765 Data Register (R/W) */
     56      1.1       ur 
     57  1.1.4.1  nathanw #define	FDCTL	5	/* Control Register (W) */
     58      1.1       ur #define	FDC_500KBPS	0x00	/* 500KBPS MFM drive transfer rate */
     59      1.1       ur #define	FDC_300KBPS	0x01	/* 300KBPS MFM drive transfer rate */
     60      1.1       ur #define	FDC_250KBPS	0x02	/* 250KBPS MFM drive transfer rate */
     61      1.1       ur #define	FDC_125KBPS	0x03	/* 125KBPS FM drive transfer rate */
     62      1.1       ur 
     63  1.1.4.1  nathanw #define	FDIN	5	/* Digital Input Register (R) */
     64      1.1       ur #define	FDI_DCHG	0x80	/* diskette has been changed */
     65      1.1       ur 
     66      1.1       ur #define	FDC_BSIZE	512
     67  1.1.4.1  nathanw #if 0
     68      1.1       ur #define	FDC_NPORT	8
     69  1.1.4.1  nathanw #endif
     70