xref: /original-bsd/sys/sparc/sparc/auxreg.h (revision 3705696b)
1 /*
2  * Copyright (c) 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This software was developed by the Computer Systems Engineering group
6  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
7  * contributed to Berkeley.
8  *
9  * All advertising materials mentioning features or use of this software
10  * must display the following acknowledgement:
11  *	This product includes software developed by the University of
12  *	California, Lawrence Berkeley Laboratory.
13  *
14  * %sccs.include.redist.c%
15  *
16  *	@(#)auxreg.h	8.1 (Berkeley) 06/11/93
17  *
18  * from: $Header: auxreg.h,v 1.8 92/11/26 03:04:45 torek Exp $ (LBL)
19  */
20 
21 /*
22  * Sun-4c Auxiliary I/O register.  This register talks to the floppy
23  * (if it exists) and the front-panel LED.
24  */
25 
26 #define	AUXIO_MB1	0xf0		/* must be set on write */
27 #define	AUXIO_FHD	0x20		/* floppy: high density (unreliable?)*/
28 #define	AUXIO_FDC	0x10		/* floppy: diskette was changed */
29 #define	AUXIO_FDS	0x08		/* floppy: drive select */
30 #define	AUXIO_FTC	0x04		/* floppy: drives Terminal Count pin */
31 #define	AUXIO_FEJ	0x02		/* floppy: eject disk */
32 #define	AUXIO_LED	0x01		/* front panel LED */
33 
34 /*
35  * We use a fixed virtual address for the register because we use it for
36  * timing short sections of code (via external hardware attached to the LED).
37  */
38 #define	AUXIO_REG	((volatile u_char *)(AUXREG_VA + 3))
39 
40 #define LED_ON		*AUXIO_REG = AUXIO_MB1|AUXIO_FEJ|AUXIO_LED
41 #define LED_OFF		*AUXIO_REG = AUXIO_MB1|AUXIO_FEJ
42 #define LED_FLIP	*AUXIO_REG = (*AUXIO_REG | AUXIO_MB1) ^ AUXIO_LED
43 
44 #define	AUXIO_BITS	"\20\6FHD\5FDC\4FDS\3FTC\2FEJ\1LED"
45