diff options
Diffstat (limited to 'include/pcmcia/cs.h')
-rw-r--r-- | include/pcmcia/cs.h | 157 |
1 files changed, 14 insertions, 143 deletions
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 57d8d0393567..68d8bde7e8d6 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -19,44 +19,6 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | /* For AccessConfigurationRegister */ | ||
23 | typedef struct conf_reg_t { | ||
24 | u_char Function; | ||
25 | u_int Action; | ||
26 | off_t Offset; | ||
27 | u_int Value; | ||
28 | } conf_reg_t; | ||
29 | |||
30 | /* Actions */ | ||
31 | #define CS_READ 1 | ||
32 | #define CS_WRITE 2 | ||
33 | |||
34 | /* for AdjustResourceInfo */ | ||
35 | /* Action field */ | ||
36 | #define REMOVE_MANAGED_RESOURCE 1 | ||
37 | #define ADD_MANAGED_RESOURCE 2 | ||
38 | |||
39 | |||
40 | typedef struct event_callback_args_t { | ||
41 | struct pcmcia_device *client_handle; | ||
42 | void *client_data; | ||
43 | } event_callback_args_t; | ||
44 | |||
45 | /* For CardValues field */ | ||
46 | #define CV_OPTION_VALUE 0x01 | ||
47 | #define CV_STATUS_VALUE 0x02 | ||
48 | #define CV_PIN_REPLACEMENT 0x04 | ||
49 | #define CV_COPY_VALUE 0x08 | ||
50 | #define CV_EXT_STATUS 0x10 | ||
51 | |||
52 | /* For GetFirst/NextClient */ | ||
53 | typedef struct client_req_t { | ||
54 | socket_t Socket; | ||
55 | u_int Attributes; | ||
56 | } client_req_t; | ||
57 | |||
58 | #define CLIENT_THIS_SOCKET 0x01 | ||
59 | |||
60 | /* ModifyConfiguration */ | 22 | /* ModifyConfiguration */ |
61 | typedef struct modconf_t { | 23 | typedef struct modconf_t { |
62 | u_int Attributes; | 24 | u_int Attributes; |
@@ -94,43 +56,6 @@ typedef struct config_req_t { | |||
94 | #define INT_CARDBUS 0x04 | 56 | #define INT_CARDBUS 0x04 |
95 | #define INT_ZOOMED_VIDEO 0x08 | 57 | #define INT_ZOOMED_VIDEO 0x08 |
96 | 58 | ||
97 | /* For RequestIO and ReleaseIO */ | ||
98 | typedef struct io_req_t { | ||
99 | u_int BasePort1; | ||
100 | u_int NumPorts1; | ||
101 | u_int Attributes1; | ||
102 | u_int BasePort2; | ||
103 | u_int NumPorts2; | ||
104 | u_int Attributes2; | ||
105 | u_int IOAddrLines; | ||
106 | } io_req_t; | ||
107 | |||
108 | /* Attributes for RequestIO and ReleaseIO */ | ||
109 | #define IO_SHARED 0x01 | ||
110 | #define IO_FIRST_SHARED 0x02 | ||
111 | #define IO_FORCE_ALIAS_ACCESS 0x04 | ||
112 | #define IO_DATA_PATH_WIDTH 0x18 | ||
113 | #define IO_DATA_PATH_WIDTH_8 0x00 | ||
114 | #define IO_DATA_PATH_WIDTH_16 0x08 | ||
115 | #define IO_DATA_PATH_WIDTH_AUTO 0x10 | ||
116 | |||
117 | /* Bits in IRQInfo1 field */ | ||
118 | #define IRQ_NMI_ID 0x01 | ||
119 | #define IRQ_IOCK_ID 0x02 | ||
120 | #define IRQ_BERR_ID 0x04 | ||
121 | #define IRQ_VEND_ID 0x08 | ||
122 | #define IRQ_INFO2_VALID 0x10 | ||
123 | #define IRQ_LEVEL_ID 0x20 | ||
124 | #define IRQ_PULSE_ID 0x40 | ||
125 | #define IRQ_SHARE_ID 0x80 | ||
126 | |||
127 | typedef struct eventmask_t { | ||
128 | u_int Attributes; | ||
129 | u_int EventMask; | ||
130 | } eventmask_t; | ||
131 | |||
132 | #define CONF_EVENT_MASK_VALID 0x01 | ||
133 | |||
134 | /* Configuration registers present */ | 59 | /* Configuration registers present */ |
135 | #define PRESENT_OPTION 0x001 | 60 | #define PRESENT_OPTION 0x001 |
136 | #define PRESENT_STATUS 0x002 | 61 | #define PRESENT_STATUS 0x002 |
@@ -143,18 +68,6 @@ typedef struct eventmask_t { | |||
143 | #define PRESENT_IOBASE_3 0x100 | 68 | #define PRESENT_IOBASE_3 0x100 |
144 | #define PRESENT_IOSIZE 0x200 | 69 | #define PRESENT_IOSIZE 0x200 |
145 | 70 | ||
146 | /* For GetMemPage, MapMemPage */ | ||
147 | typedef struct memreq_t { | ||
148 | u_int CardOffset; | ||
149 | page_t Page; | ||
150 | } memreq_t; | ||
151 | |||
152 | /* For ModifyWindow */ | ||
153 | typedef struct modwin_t { | ||
154 | u_int Attributes; | ||
155 | u_int AccessSpeed; | ||
156 | } modwin_t; | ||
157 | |||
158 | /* For RequestWindow */ | 71 | /* For RequestWindow */ |
159 | typedef struct win_req_t { | 72 | typedef struct win_req_t { |
160 | u_int Attributes; | 73 | u_int Attributes; |
@@ -164,61 +77,19 @@ typedef struct win_req_t { | |||
164 | } win_req_t; | 77 | } win_req_t; |
165 | 78 | ||
166 | /* Attributes for RequestWindow */ | 79 | /* Attributes for RequestWindow */ |
167 | #define WIN_ADDR_SPACE 0x0001 | 80 | #define WIN_MEMORY_TYPE_CM 0x00 /* default */ |
168 | #define WIN_ADDR_SPACE_MEM 0x0000 | 81 | #define WIN_MEMORY_TYPE_AM 0x20 /* MAP_ATTRIB */ |
169 | #define WIN_ADDR_SPACE_IO 0x0001 | 82 | #define WIN_DATA_WIDTH_8 0x00 /* default */ |
170 | #define WIN_MEMORY_TYPE 0x0002 | 83 | #define WIN_DATA_WIDTH_16 0x02 /* MAP_16BIT */ |
171 | #define WIN_MEMORY_TYPE_CM 0x0000 | 84 | #define WIN_ENABLE 0x01 /* MAP_ACTIVE */ |
172 | #define WIN_MEMORY_TYPE_AM 0x0002 | 85 | #define WIN_USE_WAIT 0x40 /* MAP_USE_WAIT */ |
173 | #define WIN_ENABLE 0x0004 | 86 | |
174 | #define WIN_DATA_WIDTH 0x0018 | 87 | #define WIN_FLAGS_MAP 0x63 /* MAP_ATTRIB | MAP_16BIT | MAP_ACTIVE | |
175 | #define WIN_DATA_WIDTH_8 0x0000 | 88 | MAP_USE_WAIT */ |
176 | #define WIN_DATA_WIDTH_16 0x0008 | 89 | #define WIN_FLAGS_REQ 0x1c /* mapping to socket->win[i]: |
177 | #define WIN_DATA_WIDTH_32 0x0010 | 90 | 0x04 -> 0 |
178 | #define WIN_PAGED 0x0020 | 91 | 0x08 -> 1 |
179 | #define WIN_SHARED 0x0040 | 92 | 0x0c -> 2 |
180 | #define WIN_FIRST_SHARED 0x0080 | 93 | 0x10 -> 3 */ |
181 | #define WIN_USE_WAIT 0x0100 | ||
182 | #define WIN_STRICT_ALIGN 0x0200 | ||
183 | #define WIN_MAP_BELOW_1MB 0x0400 | ||
184 | #define WIN_PREFETCH 0x0800 | ||
185 | #define WIN_CACHEABLE 0x1000 | ||
186 | #define WIN_BAR_MASK 0xe000 | ||
187 | #define WIN_BAR_SHIFT 13 | ||
188 | |||
189 | typedef struct error_info_t { | ||
190 | int func; | ||
191 | int retcode; | ||
192 | } error_info_t; | ||
193 | |||
194 | /* Flag to bind to all functions */ | ||
195 | #define BIND_FN_ALL 0xff | ||
196 | |||
197 | /* Events */ | ||
198 | #define CS_EVENT_PRI_LOW 0 | ||
199 | #define CS_EVENT_PRI_HIGH 1 | ||
200 | |||
201 | #define CS_EVENT_WRITE_PROTECT 0x000001 | ||
202 | #define CS_EVENT_CARD_LOCK 0x000002 | ||
203 | #define CS_EVENT_CARD_INSERTION 0x000004 | ||
204 | #define CS_EVENT_CARD_REMOVAL 0x000008 | ||
205 | #define CS_EVENT_BATTERY_DEAD 0x000010 | ||
206 | #define CS_EVENT_BATTERY_LOW 0x000020 | ||
207 | #define CS_EVENT_READY_CHANGE 0x000040 | ||
208 | #define CS_EVENT_CARD_DETECT 0x000080 | ||
209 | #define CS_EVENT_RESET_REQUEST 0x000100 | ||
210 | #define CS_EVENT_RESET_PHYSICAL 0x000200 | ||
211 | #define CS_EVENT_CARD_RESET 0x000400 | ||
212 | #define CS_EVENT_REGISTRATION_COMPLETE 0x000800 | ||
213 | #define CS_EVENT_PM_SUSPEND 0x002000 | ||
214 | #define CS_EVENT_PM_RESUME 0x004000 | ||
215 | #define CS_EVENT_INSERTION_REQUEST 0x008000 | ||
216 | #define CS_EVENT_EJECTION_REQUEST 0x010000 | ||
217 | #define CS_EVENT_MTD_REQUEST 0x020000 | ||
218 | #define CS_EVENT_ERASE_COMPLETE 0x040000 | ||
219 | #define CS_EVENT_REQUEST_ATTENTION 0x080000 | ||
220 | #define CS_EVENT_CB_DETECT 0x100000 | ||
221 | #define CS_EVENT_3VCARD 0x200000 | ||
222 | #define CS_EVENT_XVCARD 0x400000 | ||
223 | 94 | ||
224 | #endif /* _LINUX_CS_H */ | 95 | #endif /* _LINUX_CS_H */ |