diff options
Diffstat (limited to 'include/pcmcia/ss.h')
-rw-r--r-- | include/pcmcia/ss.h | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 6d3413a56708..0f7aacc33fe9 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -15,10 +15,12 @@ | |||
15 | #ifndef _LINUX_SS_H | 15 | #ifndef _LINUX_SS_H |
16 | #define _LINUX_SS_H | 16 | #define _LINUX_SS_H |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/device.h> | ||
20 | |||
18 | #include <pcmcia/cs_types.h> | 21 | #include <pcmcia/cs_types.h> |
19 | #include <pcmcia/cs.h> | 22 | #include <pcmcia/cs.h> |
20 | #include <pcmcia/bulkmem.h> | 23 | #include <pcmcia/bulkmem.h> |
21 | #include <linux/device.h> | ||
22 | 24 | ||
23 | /* Definitions for card status flags for GetStatus */ | 25 | /* Definitions for card status flags for GetStatus */ |
24 | #define SS_WRPROT 0x0001 | 26 | #define SS_WRPROT 0x0001 |
@@ -77,6 +79,11 @@ extern socket_state_t dead_socket; | |||
77 | /* Use this just for bridge windows */ | 79 | /* Use this just for bridge windows */ |
78 | #define MAP_IOSPACE 0x20 | 80 | #define MAP_IOSPACE 0x20 |
79 | 81 | ||
82 | /* power hook operations */ | ||
83 | #define HOOK_POWER_PRE 0x01 | ||
84 | #define HOOK_POWER_POST 0x02 | ||
85 | |||
86 | |||
80 | typedef struct pccard_io_map { | 87 | typedef struct pccard_io_map { |
81 | u_char map; | 88 | u_char map; |
82 | u_char flags; | 89 | u_char flags; |
@@ -166,7 +173,7 @@ typedef struct window_t { | |||
166 | 173 | ||
167 | struct config_t; | 174 | struct config_t; |
168 | struct pcmcia_callback; | 175 | struct pcmcia_callback; |
169 | 176 | struct user_info_t; | |
170 | 177 | ||
171 | struct pcmcia_socket { | 178 | struct pcmcia_socket { |
172 | struct module *owner; | 179 | struct module *owner; |
@@ -211,8 +218,9 @@ struct pcmcia_socket { | |||
211 | 218 | ||
212 | /* is set to one if resource setup is done using adjust_resource_info() */ | 219 | /* is set to one if resource setup is done using adjust_resource_info() */ |
213 | u8 resource_setup_old:1; | 220 | u8 resource_setup_old:1; |
221 | u8 resource_setup_new:1; | ||
214 | 222 | ||
215 | u8 reserved:6; | 223 | u8 reserved:5; |
216 | 224 | ||
217 | /* socket operations */ | 225 | /* socket operations */ |
218 | struct pccard_operations * ops; | 226 | struct pccard_operations * ops; |
@@ -222,6 +230,9 @@ struct pcmcia_socket { | |||
222 | /* Zoom video behaviour is so chip specific its not worth adding | 230 | /* Zoom video behaviour is so chip specific its not worth adding |
223 | this to _ops */ | 231 | this to _ops */ |
224 | void (*zoom_video)(struct pcmcia_socket *, int); | 232 | void (*zoom_video)(struct pcmcia_socket *, int); |
233 | |||
234 | /* so is power hook */ | ||
235 | int (*power_hook)(struct pcmcia_socket *sock, int operation); | ||
225 | 236 | ||
226 | /* state thread */ | 237 | /* state thread */ |
227 | struct semaphore skt_sem; /* protects socket h/w state */ | 238 | struct semaphore skt_sem; /* protects socket h/w state */ |
@@ -233,9 +244,32 @@ struct pcmcia_socket { | |||
233 | unsigned int thread_events; | 244 | unsigned int thread_events; |
234 | 245 | ||
235 | /* pcmcia (16-bit) */ | 246 | /* pcmcia (16-bit) */ |
236 | struct pcmcia_bus_socket *pcmcia; | ||
237 | struct pcmcia_callback *callback; | 247 | struct pcmcia_callback *callback; |
238 | 248 | ||
249 | #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) | ||
250 | struct list_head devices_list; /* PCMCIA devices */ | ||
251 | u8 device_count; /* the number of devices, used | ||
252 | * only internally and subject | ||
253 | * to incorrectness and change */ | ||
254 | |||
255 | struct { | ||
256 | u8 present:1, /* PCMCIA card is present in socket */ | ||
257 | busy:1, /* "master" ioctl is used */ | ||
258 | dead:1, /* pcmcia module is being unloaded */ | ||
259 | device_add_pending:1, /* a pseudo-multifunction-device | ||
260 | * add event is pending */ | ||
261 | reserved:4; | ||
262 | } pcmcia_state; | ||
263 | |||
264 | struct work_struct device_add; /* for adding further pseudo-multifunction | ||
265 | * devices */ | ||
266 | |||
267 | #ifdef CONFIG_PCMCIA_IOCTL | ||
268 | struct user_info_t *user; | ||
269 | wait_queue_head_t queue; | ||
270 | #endif | ||
271 | #endif | ||
272 | |||
239 | /* cardbus (32-bit) */ | 273 | /* cardbus (32-bit) */ |
240 | #ifdef CONFIG_CARDBUS | 274 | #ifdef CONFIG_CARDBUS |
241 | struct resource * cb_cis_res; | 275 | struct resource * cb_cis_res; |