diff options
Diffstat (limited to 'include/pcmcia')
-rw-r--r-- | include/pcmcia/ciscode.h | 2 | ||||
-rw-r--r-- | include/pcmcia/cs.h | 2 | ||||
-rw-r--r-- | include/pcmcia/device_id.h | 249 | ||||
-rw-r--r-- | include/pcmcia/ds.h | 9 | ||||
-rw-r--r-- | include/pcmcia/ss.h | 34 |
5 files changed, 287 insertions, 9 deletions
diff --git a/include/pcmcia/ciscode.h b/include/pcmcia/ciscode.h index 2000b43ece91..da19c297dd65 100644 --- a/include/pcmcia/ciscode.h +++ b/include/pcmcia/ciscode.h | |||
@@ -112,6 +112,8 @@ | |||
112 | 112 | ||
113 | #define MANFID_TDK 0x0105 | 113 | #define MANFID_TDK 0x0105 |
114 | #define PRODID_TDK_CF010 0x0900 | 114 | #define PRODID_TDK_CF010 0x0900 |
115 | #define PRODID_TDK_NP9610 0x0d0a | ||
116 | #define PRODID_TDK_MN3200 0x0e0a | ||
115 | #define PRODID_TDK_GN3410 0x4815 | 117 | #define PRODID_TDK_GN3410 0x4815 |
116 | 118 | ||
117 | #define MANFID_TOSHIBA 0x0098 | 119 | #define MANFID_TOSHIBA 0x0098 |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 8d8643adc786..b42ddc0c1143 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -396,7 +396,6 @@ struct pcmcia_socket; | |||
396 | int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg); | 396 | int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg); |
397 | int pcmcia_deregister_client(client_handle_t handle); | 397 | int pcmcia_deregister_client(client_handle_t handle); |
398 | int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config); | 398 | int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config); |
399 | int pcmcia_get_card_services_info(servinfo_t *info); | ||
400 | int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); | 399 | int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); |
401 | int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); | 400 | int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); |
402 | int pcmcia_get_status(client_handle_t handle, cs_status_t *status); | 401 | int pcmcia_get_status(client_handle_t handle, cs_status_t *status); |
@@ -417,7 +416,6 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt); | |||
417 | int pcmcia_resume_card(struct pcmcia_socket *skt); | 416 | int pcmcia_resume_card(struct pcmcia_socket *skt); |
418 | int pcmcia_eject_card(struct pcmcia_socket *skt); | 417 | int pcmcia_eject_card(struct pcmcia_socket *skt); |
419 | int pcmcia_insert_card(struct pcmcia_socket *skt); | 418 | int pcmcia_insert_card(struct pcmcia_socket *skt); |
420 | int pcmcia_report_error(client_handle_t handle, error_info_t *err); | ||
421 | 419 | ||
422 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); | 420 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); |
423 | void pcmcia_put_socket(struct pcmcia_socket *skt); | 421 | void pcmcia_put_socket(struct pcmcia_socket *skt); |
diff --git a/include/pcmcia/device_id.h b/include/pcmcia/device_id.h new file mode 100644 index 000000000000..346d81ece287 --- /dev/null +++ b/include/pcmcia/device_id.h | |||
@@ -0,0 +1,249 @@ | |||
1 | /* | ||
2 | * Copyright (2003-2004) Dominik Brodowski <linux@brodo.de> | ||
3 | * David Woodhouse | ||
4 | * | ||
5 | * License: GPL v2 | ||
6 | */ | ||
7 | |||
8 | #define PCMCIA_DEVICE_MANF_CARD(manf, card) { \ | ||
9 | .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
10 | PCMCIA_DEV_ID_MATCH_CARD_ID, \ | ||
11 | .manf_id = (manf), \ | ||
12 | .card_id = (card), } | ||
13 | |||
14 | #define PCMCIA_DEVICE_FUNC_ID(func) { \ | ||
15 | .match_flags = PCMCIA_DEV_ID_MATCH_FUNC_ID, \ | ||
16 | .func_id = (func), } | ||
17 | |||
18 | #define PCMCIA_DEVICE_PROD_ID1(v1, vh1) { \ | ||
19 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1, \ | ||
20 | .prod_id = { (v1), NULL, NULL, NULL }, \ | ||
21 | .prod_id_hash = { (vh1), 0, 0, 0 }, } | ||
22 | |||
23 | #define PCMCIA_DEVICE_PROD_ID2(v2, vh2) { \ | ||
24 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
25 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
26 | .prod_id_hash = { 0, (vh2), 0, 0 }, } | ||
27 | |||
28 | #define PCMCIA_DEVICE_PROD_ID12(v1, v2, vh1, vh2) { \ | ||
29 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
30 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
31 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
32 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, } | ||
33 | |||
34 | #define PCMCIA_DEVICE_PROD_ID13(v1, v3, vh1, vh3) { \ | ||
35 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
36 | PCMCIA_DEV_ID_MATCH_PROD_ID3, \ | ||
37 | .prod_id = { (v1), NULL, (v3), NULL }, \ | ||
38 | .prod_id_hash = { (vh1), 0, (vh3), 0 }, } | ||
39 | |||
40 | #define PCMCIA_DEVICE_PROD_ID14(v1, v4, vh1, vh4) { \ | ||
41 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
42 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
43 | .prod_id = { (v1), NULL, NULL, (v4) }, \ | ||
44 | .prod_id_hash = { (vh1), 0, 0, (vh4) }, } | ||
45 | |||
46 | #define PCMCIA_DEVICE_PROD_ID123(v1, v2, v3, vh1, vh2, vh3) { \ | ||
47 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
48 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
49 | PCMCIA_DEV_ID_MATCH_PROD_ID3, \ | ||
50 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
51 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, } | ||
52 | |||
53 | #define PCMCIA_DEVICE_PROD_ID124(v1, v2, v4, vh1, vh2, vh4) { \ | ||
54 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
55 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
56 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
57 | .prod_id = { (v1), (v2), NULL, (v4) }, \ | ||
58 | .prod_id_hash = { (vh1), (vh2), 0, (vh4) }, } | ||
59 | |||
60 | #define PCMCIA_DEVICE_PROD_ID134(v1, v3, v4, vh1, vh3, vh4) { \ | ||
61 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
62 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
63 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
64 | .prod_id = { (v1), NULL, (v3), (v4) }, \ | ||
65 | .prod_id_hash = { (vh1), 0, (vh3), (vh4) }, } | ||
66 | |||
67 | #define PCMCIA_DEVICE_PROD_ID1234(v1, v2, v3, v4, vh1, vh2, vh3, vh4) { \ | ||
68 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
69 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
70 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
71 | PCMCIA_DEV_ID_MATCH_PROD_ID4, \ | ||
72 | .prod_id = { (v1), (v2), (v3), (v4) }, \ | ||
73 | .prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, } | ||
74 | |||
75 | |||
76 | /* multi-function devices */ | ||
77 | |||
78 | #define PCMCIA_MFC_DEVICE_MANF_CARD(mfc, manf, card) { \ | ||
79 | .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
80 | PCMCIA_DEV_ID_MATCH_CARD_ID| \ | ||
81 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
82 | .manf_id = (manf), \ | ||
83 | .card_id = (card), \ | ||
84 | .function = (mfc), } | ||
85 | |||
86 | #define PCMCIA_MFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \ | ||
87 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
88 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
89 | .prod_id = { (v1), NULL, NULL, NULL }, \ | ||
90 | .prod_id_hash = { (vh1), 0, 0, 0 }, \ | ||
91 | .function = (mfc), } | ||
92 | |||
93 | #define PCMCIA_MFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \ | ||
94 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
95 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
96 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
97 | .prod_id_hash = { 0, (vh2), 0, 0 }, \ | ||
98 | .function = (mfc), } | ||
99 | |||
100 | #define PCMCIA_MFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \ | ||
101 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
102 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
103 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
104 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
105 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
106 | .function = (mfc), } | ||
107 | |||
108 | #define PCMCIA_MFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \ | ||
109 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
110 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
111 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
112 | .prod_id = { (v1), NULL, (v3), NULL }, \ | ||
113 | .prod_id_hash = { (vh1), 0, (vh3), 0 }, \ | ||
114 | .function = (mfc), } | ||
115 | |||
116 | #define PCMCIA_MFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \ | ||
117 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
118 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
119 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
120 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
121 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
122 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \ | ||
123 | .function = (mfc), } | ||
124 | |||
125 | /* pseudo multi-function devices */ | ||
126 | |||
127 | #define PCMCIA_PFC_DEVICE_MANF_CARD(mfc, manf, card) { \ | ||
128 | .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
129 | PCMCIA_DEV_ID_MATCH_CARD_ID| \ | ||
130 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
131 | .manf_id = (manf), \ | ||
132 | .card_id = (card), \ | ||
133 | .device_no = (mfc), } | ||
134 | |||
135 | #define PCMCIA_PFC_DEVICE_PROD_ID1(mfc, v1, vh1) { \ | ||
136 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
137 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
138 | .prod_id = { (v1), NULL, NULL, NULL }, \ | ||
139 | .prod_id_hash = { (vh1), 0, 0, 0 }, \ | ||
140 | .device_no = (mfc), } | ||
141 | |||
142 | #define PCMCIA_PFC_DEVICE_PROD_ID2(mfc, v2, vh2) { \ | ||
143 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
144 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
145 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
146 | .prod_id_hash = { 0, (vh2), 0, 0 }, \ | ||
147 | .device_no = (mfc), } | ||
148 | |||
149 | #define PCMCIA_PFC_DEVICE_PROD_ID12(mfc, v1, v2, vh1, vh2) { \ | ||
150 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
151 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
152 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
153 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
154 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
155 | .device_no = (mfc), } | ||
156 | |||
157 | #define PCMCIA_PFC_DEVICE_PROD_ID13(mfc, v1, v3, vh1, vh3) { \ | ||
158 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
159 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
160 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
161 | .prod_id = { (v1), NULL, (v3), NULL }, \ | ||
162 | .prod_id_hash = { (vh1), 0, (vh3), 0 }, \ | ||
163 | .device_no = (mfc), } | ||
164 | |||
165 | #define PCMCIA_PFC_DEVICE_PROD_ID123(mfc, v1, v2, v3, vh1, vh2, vh3) { \ | ||
166 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
167 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
168 | PCMCIA_DEV_ID_MATCH_PROD_ID3| \ | ||
169 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
170 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
171 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \ | ||
172 | .device_no = (mfc), } | ||
173 | |||
174 | /* cards needing a CIS override */ | ||
175 | |||
176 | #define PCMCIA_DEVICE_CIS_MANF_CARD(manf, card, _cisfile) { \ | ||
177 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
178 | PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
179 | PCMCIA_DEV_ID_MATCH_CARD_ID, \ | ||
180 | .manf_id = (manf), \ | ||
181 | .card_id = (card), \ | ||
182 | .cisfile = (_cisfile)} | ||
183 | |||
184 | #define PCMCIA_DEVICE_CIS_PROD_ID12(v1, v2, vh1, vh2, _cisfile) { \ | ||
185 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
186 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
187 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
188 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
189 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
190 | .cisfile = (_cisfile)} | ||
191 | |||
192 | #define PCMCIA_DEVICE_CIS_PROD_ID123(v1, v2, v3, vh1, vh2, vh3, _cisfile) { \ | ||
193 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
194 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
195 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
196 | PCMCIA_DEV_ID_MATCH_PROD_ID3, \ | ||
197 | .prod_id = { (v1), (v2), (v3), NULL },\ | ||
198 | .prod_id_hash = { (vh1), (vh2), (vh3), 0 }, \ | ||
199 | .cisfile = (_cisfile)} | ||
200 | |||
201 | |||
202 | #define PCMCIA_DEVICE_CIS_PROD_ID2(v2, vh2, _cisfile) { \ | ||
203 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
204 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | ||
205 | .prod_id = { NULL, (v2), NULL, NULL }, \ | ||
206 | .prod_id_hash = { 0, (vh2), 0, 0 }, \ | ||
207 | .cisfile = (_cisfile)} | ||
208 | |||
209 | #define PCMCIA_PFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \ | ||
210 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
211 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
212 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
213 | PCMCIA_DEV_ID_MATCH_DEVICE_NO, \ | ||
214 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
215 | .prod_id_hash = { (vh1), (vh2), 0, 0 },\ | ||
216 | .device_no = (mfc), \ | ||
217 | .cisfile = (_cisfile)} | ||
218 | |||
219 | #define PCMCIA_MFC_DEVICE_CIS_MANF_CARD(mfc, manf, card, _cisfile) { \ | ||
220 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
221 | PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
222 | PCMCIA_DEV_ID_MATCH_CARD_ID| \ | ||
223 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
224 | .manf_id = (manf), \ | ||
225 | .card_id = (card), \ | ||
226 | .function = (mfc), \ | ||
227 | .cisfile = (_cisfile)} | ||
228 | |||
229 | #define PCMCIA_MFC_DEVICE_CIS_PROD_ID12(mfc, v1, v2, vh1, vh2, _cisfile) { \ | ||
230 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
231 | PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | ||
232 | PCMCIA_DEV_ID_MATCH_PROD_ID2| \ | ||
233 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
234 | .prod_id = { (v1), (v2), NULL, NULL }, \ | ||
235 | .prod_id_hash = { (vh1), (vh2), 0, 0 }, \ | ||
236 | .function = (mfc), \ | ||
237 | .cisfile = (_cisfile)} | ||
238 | |||
239 | #define PCMCIA_MFC_DEVICE_CIS_PROD_ID4(mfc, v4, vh4, _cisfile) { \ | ||
240 | .match_flags = PCMCIA_DEV_ID_MATCH_FAKE_CIS | \ | ||
241 | PCMCIA_DEV_ID_MATCH_PROD_ID4| \ | ||
242 | PCMCIA_DEV_ID_MATCH_FUNCTION, \ | ||
243 | .prod_id = { NULL, NULL, NULL, (v4) }, \ | ||
244 | .prod_id_hash = { 0, 0, 0, (vh4) }, \ | ||
245 | .function = (mfc), \ | ||
246 | .cisfile = (_cisfile)} | ||
247 | |||
248 | |||
249 | #define PCMCIA_DEVICE_NULL { .match_flags = 0, } | ||
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 312fd958c901..2b52553f2d94 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -18,6 +18,8 @@ | |||
18 | 18 | ||
19 | #include <pcmcia/bulkmem.h> | 19 | #include <pcmcia/bulkmem.h> |
20 | #include <pcmcia/cs_types.h> | 20 | #include <pcmcia/cs_types.h> |
21 | #include <pcmcia/device_id.h> | ||
22 | #include <linux/mod_devicetable.h> | ||
21 | 23 | ||
22 | typedef struct tuple_parse_t { | 24 | typedef struct tuple_parse_t { |
23 | tuple_t tuple; | 25 | tuple_t tuple; |
@@ -129,12 +131,11 @@ typedef struct dev_link_t { | |||
129 | 131 | ||
130 | struct pcmcia_socket; | 132 | struct pcmcia_socket; |
131 | 133 | ||
132 | extern struct bus_type pcmcia_bus_type; | ||
133 | |||
134 | struct pcmcia_driver { | 134 | struct pcmcia_driver { |
135 | dev_link_t *(*attach)(void); | 135 | dev_link_t *(*attach)(void); |
136 | void (*detach)(dev_link_t *); | 136 | void (*detach)(dev_link_t *); |
137 | struct module *owner; | 137 | struct module *owner; |
138 | struct pcmcia_device_id *id_table; | ||
138 | struct device_driver drv; | 139 | struct device_driver drv; |
139 | }; | 140 | }; |
140 | 141 | ||
@@ -173,7 +174,9 @@ struct pcmcia_device { | |||
173 | u8 has_manf_id:1; | 174 | u8 has_manf_id:1; |
174 | u8 has_card_id:1; | 175 | u8 has_card_id:1; |
175 | u8 has_func_id:1; | 176 | u8 has_func_id:1; |
176 | u8 reserved:5; | 177 | |
178 | u8 allow_func_id_match:1; | ||
179 | u8 reserved:4; | ||
177 | 180 | ||
178 | u8 func_id; | 181 | u8 func_id; |
179 | u16 manf_id; | 182 | u16 manf_id; |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 67b867f31fe4..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 |
@@ -171,7 +173,7 @@ typedef struct window_t { | |||
171 | 173 | ||
172 | struct config_t; | 174 | struct config_t; |
173 | struct pcmcia_callback; | 175 | struct pcmcia_callback; |
174 | 176 | struct user_info_t; | |
175 | 177 | ||
176 | struct pcmcia_socket { | 178 | struct pcmcia_socket { |
177 | struct module *owner; | 179 | struct module *owner; |
@@ -216,8 +218,9 @@ struct pcmcia_socket { | |||
216 | 218 | ||
217 | /* 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() */ |
218 | u8 resource_setup_old:1; | 220 | u8 resource_setup_old:1; |
221 | u8 resource_setup_new:1; | ||
219 | 222 | ||
220 | u8 reserved:6; | 223 | u8 reserved:5; |
221 | 224 | ||
222 | /* socket operations */ | 225 | /* socket operations */ |
223 | struct pccard_operations * ops; | 226 | struct pccard_operations * ops; |
@@ -241,9 +244,32 @@ struct pcmcia_socket { | |||
241 | unsigned int thread_events; | 244 | unsigned int thread_events; |
242 | 245 | ||
243 | /* pcmcia (16-bit) */ | 246 | /* pcmcia (16-bit) */ |
244 | struct pcmcia_bus_socket *pcmcia; | ||
245 | struct pcmcia_callback *callback; | 247 | struct pcmcia_callback *callback; |
246 | 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 | |||
247 | /* cardbus (32-bit) */ | 273 | /* cardbus (32-bit) */ |
248 | #ifdef CONFIG_CARDBUS | 274 | #ifdef CONFIG_CARDBUS |
249 | struct resource * cb_cis_res; | 275 | struct resource * cb_cis_res; |