Home | History | Annotate | Line # | Download | only in jazz
      1  1.4  christos /*	$NetBSD: fdreg.h,v 1.4 2005/12/11 12:16:39 christos 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.3       agc  * 3. Neither the name of the University nor the names of its contributors
     18  1.1        ur  *    may be used to endorse or promote products derived from this software
     19  1.1        ur  *    without specific prior written permission.
     20  1.1        ur  *
     21  1.1        ur  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22  1.1        ur  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.1        ur  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.1        ur  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25  1.1        ur  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  1.1        ur  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  1.1        ur  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  1.1        ur  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  1.1        ur  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  1.1        ur  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  1.1        ur  * SUCH DAMAGE.
     32  1.1        ur  *
     33  1.1        ur  *	@(#)fdreg.h	7.1 (Berkeley) 5/9/91
     34  1.1        ur  */
     35  1.1        ur 
     36  1.1        ur /*
     37  1.1        ur  * AT floppy controller registers and bitfields
     38  1.1        ur  */
     39  1.1        ur 
     40  1.1        ur /* uses NEC765 controller */
     41  1.1        ur #include <dev/ic/nec765reg.h>
     42  1.1        ur 
     43  1.1        ur /* registers */
     44  1.2      soda #define	FDOUT	0	/* Digital Output Register (W) */
     45  1.1        ur #define	FDO_FDSEL	0x03	/*  floppy device select */
     46  1.1        ur #define	FDO_FRST	0x04	/*  floppy controller reset */
     47  1.1        ur #define	FDO_FDMAEN	0x08	/*  enable floppy DMA and Interrupt */
     48  1.1        ur #define	FDO_MOEN(n)	((1 << n) * 0x10)	/* motor enable */
     49  1.1        ur 
     50  1.2      soda #define	FDSTS	2	/* NEC 765 Main Status Register (R) */
     51  1.2      soda #define	FDDATA	3	/* NEC 765 Data Register (R/W) */
     52  1.1        ur 
     53  1.2      soda #define	FDCTL	5	/* Control Register (W) */
     54  1.1        ur #define	FDC_500KBPS	0x00	/* 500KBPS MFM drive transfer rate */
     55  1.1        ur #define	FDC_300KBPS	0x01	/* 300KBPS MFM drive transfer rate */
     56  1.1        ur #define	FDC_250KBPS	0x02	/* 250KBPS MFM drive transfer rate */
     57  1.1        ur #define	FDC_125KBPS	0x03	/* 125KBPS FM drive transfer rate */
     58  1.1        ur 
     59  1.2      soda #define	FDIN	5	/* Digital Input Register (R) */
     60  1.1        ur #define	FDI_DCHG	0x80	/* diskette has been changed */
     61  1.1        ur 
     62  1.1        ur #define	FDC_BSIZE	512
     63  1.2      soda #if 0
     64  1.1        ur #define	FDC_NPORT	8
     65  1.2      soda #endif
     66