xref: /netbsd/sys/arch/hp300/dev/intioreg.h (revision bf9ec67e)
1 /*	$NetBSD: intioreg.h,v 1.1 2001/11/17 23:33:22 gmcgarry Exp $	*/
2 
3 /*-
4  * Copyright (c) 2001 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by Gregory McGarry.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. All advertising materials mentioning features or use of this software
19  *    must display the following acknowledgement:
20  *        This product includes software developed by the NetBSD
21  *        Foundation, Inc. and its contributors.
22  * 4. Neither the name of The NetBSD Foundation nor the names of its
23  *    contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  * POSSIBILITY OF SUCH DAMAGE.
37  */
38 
39 /*
40  *  Registers for interface to the wired devices.
41  */
42 
43 /* HP3xx/4xx registers */
44 #define INTIO_DEV_3xx_PAD0	0
45 #define INTIO_DEV_3xx_DATA	1
46 #define INTIO_DEV_3xx_PAD1	2
47 #define INTIO_DEV_3xx_CMD	3
48 #define INTIO_DEV_3xx_STAT	3
49 
50 /* HP7xx registers - XXX check these */
51 #define INTIO_DEV_7xx_RSTHOLD	0
52 #define INTIO_DEV_7xx_DATA	2048
53 #define INTIO_DEV_7xx_CMD	2049
54 #define INTIO_DEV_7xx_STAT	2049
55 #define INTIO_DEV_7xx_RSTREL	3072
56 
57 /* HP8xx registers - XXX check these */
58 #define INTIO_DEV_8xx_DATA	3
59 #define INTIO_DEV_8xx_CMD	11
60 #define INTIO_DEV_8xx_STAT	11
61 
62 /* Status bits */
63 #define INTIO_DEV_DATA_READY	0x01
64 #define INTIO_DEV_BUSY		0x02
65 /* the top four bits specify a "service request" status code */
66 #define INTIO_DEV_SRSHIFT	4
67 #define INTIO_DEV_SRMASK	0x0f
68 
69 /* Valid "service request" status codes */
70 #define INTIO_DEV_SR_DATAAVAIL	0x04
71 /* the specific wired device will overload the remaining bits */
72