h17201
s 00008/00006/00052
d D 1.3 94/06/22 14:59:41 hjs 4 3
c cstyle -p clean
e
s 00003/00002/00055
d D 1.2 94/04/04 14:04:16 hjs 3 1
c DDICT-clean
e
s 00000/00000/00000
d R 1.2 94/03/16 14:41:22 Codemgr 2 1
c SunPro Code Manager data about conflicts, renames, etc...
c Name history : 1 0 src/driver_dev/pio/pio_io.h
e
s 00057/00000/00000
d D 1.1 94/03/16 14:41:21 hjs 1 0
c date and time created 94/03/16 14:41:21 by hjs
e
u
U
f e 0
t
T
I 1
D 4
/* %W% copyright %E% Sun Microsystems, Inc." */
E 4
I 4

#pragma	ident	"%Z%%M% %I%	%E% SMI"

E 4
/*
 * Copyright (c) 1992, Sun Microsystems, Inc.  All Rights Reserved.
 * Sun considers its source code as an unpublished, proprietary
 * trade secret, and it is available only under strict license
 * provisions.  This copyright notice is placed here only to protect
 * Sun in the event the source is deemed a published work.
 * Disassembly, decompilation, or other means of reducing the
 * object code to human readable form is prohibited by the license
 * agreement under which this code is provided to the user or
 * company in possession of this copy.
D 4
 * 
E 4
I 4
 *
E 4
 * RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the
 * Government is subject to restrictions as set forth in
 * subparagraph (c)(1)(ii) of the Rights in Technical Data and
 * Computer Software clause at DFARS 52.227-7013 and in similar
 * clauses in the FAR and NASA FAR Supplement.
D 4
 * 
E 4
I 4
 *
E 4
 * These examples are provided with no warranties of any kind,
 * including without limitation accuracy and usefulness, and Sun
 * expressly disclaims all implied warranties of merchantability,
 * fitness for a particular purpose and non-infringement. In no
 * event shall Sun be liable for any damages, including without
 * limitation, direct, special, indirect, or consequential damages
 * arising out of, or relating to, use of these examples by customer
 * or any third party. Sun is under no obligation to provide support
 * to customer for this software.
 */


/*
 * commands for pio_ioctl
 */
D 3
#define	PIO_GET_CSR		_IOR('b', 1, Pio_csr)
#define	PIO_SET_CSR		_IOW('p', 2, Pio_csr)
E 3
I 3
D 4
#define	PIO_IOC			( 'p' << 8 )
#define	PIO_GET_CSR		( PIO_IOC | 1 )
#define	PIO_SET_CSR		( PIO_IOC | 2 )
E 4
I 4
#define	PIO_IOC			('p' << 8)
#define	PIO_GET_CSR		(PIO_IOC | 1)
#define	PIO_SET_CSR		(PIO_IOC | 2)
E 4
E 3

/*
 * CSR definition
 */
typedef u_char Pio_csr;

/*
 * bit definitions for CSR
 */
#define	PIO_ENABLE	0x01
#define	PIO_INTR_ENABLE	0x02
#define	PIO_INTR_CLEAR	0x04
#define	PIO_RESERVED1	0x08
#define	PIO_RESERVED2	0x10
#define	PIO_RESERVED3	0x20
#define	PIO_RESERVED4	0x40
#define	PIO_IDLE_INTR	0x80

/*
 * useful combinations of the above
 */
#define	PIO_RESET	0x00
E 1
