xref: /haiku/headers/os/drivers/pcmcia/cisreg.h (revision d7cd6603b45de62cd419064391d55befe495e3b5)
1*d7cd6603SJérôme Duval /*
2*d7cd6603SJérôme Duval  * cisreg.h 1.18 2001/08/24 12:16:12
3*d7cd6603SJérôme Duval  *
4*d7cd6603SJérôme Duval  * The contents of this file are subject to the Mozilla Public License
5*d7cd6603SJérôme Duval  * Version 1.1 (the "License"); you may not use this file except in
6*d7cd6603SJérôme Duval  * compliance with the License. You may obtain a copy of the License
7*d7cd6603SJérôme Duval  * at http://www.mozilla.org/MPL/
8*d7cd6603SJérôme Duval  *
9*d7cd6603SJérôme Duval  * Software distributed under the License is distributed on an "AS IS"
10*d7cd6603SJérôme Duval  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11*d7cd6603SJérôme Duval  * the License for the specific language governing rights and
12*d7cd6603SJérôme Duval  * limitations under the License.
13*d7cd6603SJérôme Duval  *
14*d7cd6603SJérôme Duval  * The initial developer of the original code is David A. Hinds
15*d7cd6603SJérôme Duval  * <dahinds@users.sourceforge.net>.  Portions created by David A. Hinds
16*d7cd6603SJérôme Duval  * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
17*d7cd6603SJérôme Duval  *
18*d7cd6603SJérôme Duval  * Alternatively, the contents of this file may be used under the
19*d7cd6603SJérôme Duval  * terms of the GNU General Public License version 2 (the "GPL"), in
20*d7cd6603SJérôme Duval  * which case the provisions of the GPL are applicable instead of the
21*d7cd6603SJérôme Duval  * above.  If you wish to allow the use of your version of this file
22*d7cd6603SJérôme Duval  * only under the terms of the GPL and not to allow others to use
23*d7cd6603SJérôme Duval  * your version of this file under the MPL, indicate your decision by
24*d7cd6603SJérôme Duval  * deleting the provisions above and replace them with the notice and
25*d7cd6603SJérôme Duval  * other provisions required by the GPL.  If you do not delete the
26*d7cd6603SJérôme Duval  * provisions above, a recipient may use your version of this file
27*d7cd6603SJérôme Duval  * under either the MPL or the GPL.
28*d7cd6603SJérôme Duval  */
29*d7cd6603SJérôme Duval 
30*d7cd6603SJérôme Duval #ifndef _LINUX_CISREG_H
31*d7cd6603SJérôme Duval #define _LINUX_CISREG_H
32*d7cd6603SJérôme Duval 
33*d7cd6603SJérôme Duval /*
34*d7cd6603SJérôme Duval  * Offsets from ConfigBase for CIS registers
35*d7cd6603SJérôme Duval  */
36*d7cd6603SJérôme Duval #define CISREG_COR		0x00
37*d7cd6603SJérôme Duval #define CISREG_CCSR		0x02
38*d7cd6603SJérôme Duval #define CISREG_PRR		0x04
39*d7cd6603SJérôme Duval #define CISREG_SCR		0x06
40*d7cd6603SJérôme Duval #define CISREG_ESR		0x08
41*d7cd6603SJérôme Duval #define CISREG_IOBASE_0		0x0a
42*d7cd6603SJérôme Duval #define CISREG_IOBASE_1		0x0c
43*d7cd6603SJérôme Duval #define CISREG_IOBASE_2		0x0e
44*d7cd6603SJérôme Duval #define CISREG_IOBASE_3		0x10
45*d7cd6603SJérôme Duval #define CISREG_IOSIZE		0x12
46*d7cd6603SJérôme Duval 
47*d7cd6603SJérôme Duval /*
48*d7cd6603SJérôme Duval  * Configuration Option Register
49*d7cd6603SJérôme Duval  */
50*d7cd6603SJérôme Duval #define COR_CONFIG_MASK		0x3f
51*d7cd6603SJérôme Duval #define COR_MFC_CONFIG_MASK	0x38
52*d7cd6603SJérôme Duval #define COR_FUNC_ENA		0x01
53*d7cd6603SJérôme Duval #define COR_ADDR_DECODE		0x02
54*d7cd6603SJérôme Duval #define COR_IREQ_ENA		0x04
55*d7cd6603SJérôme Duval #define COR_LEVEL_REQ		0x40
56*d7cd6603SJérôme Duval #define COR_SOFT_RESET		0x80
57*d7cd6603SJérôme Duval 
58*d7cd6603SJérôme Duval /*
59*d7cd6603SJérôme Duval  * Card Configuration and Status Register
60*d7cd6603SJérôme Duval  */
61*d7cd6603SJérôme Duval #define CCSR_INTR_ACK		0x01
62*d7cd6603SJérôme Duval #define CCSR_INTR_PENDING	0x02
63*d7cd6603SJérôme Duval #define CCSR_POWER_DOWN		0x04
64*d7cd6603SJérôme Duval #define CCSR_AUDIO_ENA		0x08
65*d7cd6603SJérôme Duval #define CCSR_IOIS8		0x20
66*d7cd6603SJérôme Duval #define CCSR_SIGCHG_ENA		0x40
67*d7cd6603SJérôme Duval #define CCSR_CHANGED		0x80
68*d7cd6603SJérôme Duval 
69*d7cd6603SJérôme Duval /*
70*d7cd6603SJérôme Duval  * Pin Replacement Register
71*d7cd6603SJérôme Duval  */
72*d7cd6603SJérôme Duval #define PRR_WP_STATUS		0x01
73*d7cd6603SJérôme Duval #define PRR_READY_STATUS	0x02
74*d7cd6603SJérôme Duval #define PRR_BVD2_STATUS		0x04
75*d7cd6603SJérôme Duval #define PRR_BVD1_STATUS		0x08
76*d7cd6603SJérôme Duval #define PRR_WP_EVENT		0x10
77*d7cd6603SJérôme Duval #define PRR_READY_EVENT		0x20
78*d7cd6603SJérôme Duval #define PRR_BVD2_EVENT		0x40
79*d7cd6603SJérôme Duval #define PRR_BVD1_EVENT		0x80
80*d7cd6603SJérôme Duval 
81*d7cd6603SJérôme Duval /*
82*d7cd6603SJérôme Duval  * Socket and Copy Register
83*d7cd6603SJérôme Duval  */
84*d7cd6603SJérôme Duval #define SCR_SOCKET_NUM		0x0f
85*d7cd6603SJérôme Duval #define SCR_COPY_NUM		0x70
86*d7cd6603SJérôme Duval 
87*d7cd6603SJérôme Duval /*
88*d7cd6603SJérôme Duval  * Extended Status Register
89*d7cd6603SJérôme Duval  */
90*d7cd6603SJérôme Duval #define ESR_REQ_ATTN_ENA	0x01
91*d7cd6603SJérôme Duval #define ESR_REQ_ATTN		0x10
92*d7cd6603SJérôme Duval 
93*d7cd6603SJérôme Duval /*
94*d7cd6603SJérôme Duval  * CardBus Function Status Registers
95*d7cd6603SJérôme Duval  */
96*d7cd6603SJérôme Duval #define CBFN_EVENT		0x00
97*d7cd6603SJérôme Duval #define CBFN_MASK		0x04
98*d7cd6603SJérôme Duval #define CBFN_STATE		0x08
99*d7cd6603SJérôme Duval #define CBFN_FORCE		0x0c
100*d7cd6603SJérôme Duval 
101*d7cd6603SJérôme Duval /*
102*d7cd6603SJérôme Duval  * These apply to all the CardBus function registers
103*d7cd6603SJérôme Duval  */
104*d7cd6603SJérôme Duval #define CBFN_WP			0x0001
105*d7cd6603SJérôme Duval #define CBFN_READY		0x0002
106*d7cd6603SJérôme Duval #define CBFN_BVD2		0x0004
107*d7cd6603SJérôme Duval #define CBFN_BVD1		0x0008
108*d7cd6603SJérôme Duval #define CBFN_GWAKE		0x0010
109*d7cd6603SJérôme Duval #define CBFN_INTR		0x8000
110*d7cd6603SJérôme Duval 
111*d7cd6603SJérôme Duval /*
112*d7cd6603SJérôme Duval  * Extra bits in the Function Event Mask Register
113*d7cd6603SJérôme Duval  */
114*d7cd6603SJérôme Duval #define FEMR_BAM_ENA		0x0020
115*d7cd6603SJérôme Duval #define FEMR_PWM_ENA		0x0040
116*d7cd6603SJérôme Duval #define FEMR_WKUP_MASK		0x4000
117*d7cd6603SJérôme Duval 
118*d7cd6603SJérôme Duval /*
119*d7cd6603SJérôme Duval  * Indirect Addressing Registers for Zoomed Video: these are addresses
120*d7cd6603SJérôme Duval  * in common memory space
121*d7cd6603SJérôme Duval  */
122*d7cd6603SJérôme Duval #define CISREG_ICTRL0		0x02	/* control registers */
123*d7cd6603SJérôme Duval #define CISREG_ICTRL1		0x03
124*d7cd6603SJérôme Duval #define CISREG_IADDR0		0x04	/* address registers */
125*d7cd6603SJérôme Duval #define CISREG_IADDR1		0x05
126*d7cd6603SJérôme Duval #define CISREG_IADDR2		0x06
127*d7cd6603SJérôme Duval #define CISREG_IADDR3		0x07
128*d7cd6603SJérôme Duval #define CISREG_IDATA0		0x08	/* data registers */
129*d7cd6603SJérôme Duval #define CISREG_IDATA1		0x09
130*d7cd6603SJérôme Duval 
131*d7cd6603SJérôme Duval #define ICTRL0_COMMON		0x01
132*d7cd6603SJérôme Duval #define ICTRL0_AUTOINC		0x02
133*d7cd6603SJérôme Duval #define ICTRL0_BYTEGRAN		0x04
134*d7cd6603SJérôme Duval 
135*d7cd6603SJérôme Duval #endif /* _LINUX_CISREG_H */
136