Fix some constants in preparation for my new driver.

This commit is contained in:
mycroft 1994-03-10 18:10:41 +00:00
parent a21a74eddd
commit 9ece60144d
2 changed files with 12 additions and 11 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.26 1994/03/08 12:21:59 mycroft Exp $
* $Id: fd.c,v 1.27 1994/03/10 18:10:41 mycroft Exp $
*
* Largely rewritten to handle multiple controllers and drives
* By Julian Elischer, Sun Apr 4 16:34:33 WST 1993
@ -400,13 +400,13 @@ set_motor(fdcu_t fdcu, fdu_t fdu, int reset)
outb(fdc_data[fdcu].baseport+fdout,
selunit
| (reset ? 0 : (FDO_FRST|FDO_FDMAEN))
| (m0 ? FDO_MOEN0 : 0)
| (m1 ? FDO_MOEN1 : 0));
| (m0 ? FDO_MOEN(0) : 0)
| (m1 ? FDO_MOEN(1) : 0));
TRACE1("[0x%x->fdout]",(
selunit
| (reset ? 0 : (FDO_FRST|FDO_FDMAEN))
| (m0 ? FDO_MOEN0 : 0)
| (m1 ? FDO_MOEN1 : 0)));
| (m0 ? FDO_MOEN(0) : 0)
| (m1 ? FDO_MOEN(1) : 0)));
}
fd_turnoff(fdu_t fdu)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)fdreg.h 7.1 (Berkeley) 5/9/91
* $Id: fdreg.h,v 1.4 1993/06/18 06:19:20 cgd Exp $
* $Id: fdreg.h,v 1.5 1994/03/10 18:10:43 mycroft Exp $
*/
/*
@ -39,17 +39,14 @@
*/
/* uses NEC765 controller */
#include "i386/isa/ic/nec765.h"
#include <i386/isa/ic/nec765.h>
/* registers */
#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_MOEN(n) ((1 << n) * 0x10) /* motor enable */
#define fdsts 4 /* NEC 765 Main Status Register (R) */
#define fddata 5 /* NEC 765 Data Register (R/W) */
@ -62,3 +59,7 @@
#define fdin 7 /* Digital Input Register (R) */
#define FDI_DCHG 0x80 /* diskette has been changed */
#define FDC_BSIZE 512
#define FDC_NPORT 8
#define FDC_MAXIOSIZE NBPG /* XXX should be MAXBSIZE */