
#pragma	ident	"@(#)pio_io.h 1.3	94/06/22 SMI"

/*
 * 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.
 *
 * 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.
 *
 * 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
 */
#define	PIO_IOC			('p' << 8)
#define	PIO_GET_CSR		(PIO_IOC | 1)
#define	PIO_SET_CSR		(PIO_IOC | 2)

/*
 * 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
