diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-12 17:56:33 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 17:41:09 -0500 |
commit | 9da4bc6d6a38c1c3d850c046d0aee324c1a2e52a (patch) | |
tree | 2783de4a280ece6707b9b5800b82e1149b4d4f48 /drivers/pcmcia/yenta_socket.c | |
parent | 7f316b033b36adfbdf56bfb15c13de49798ab0b2 (diff) |
[PATCH] pcmcia: remove get_socket callback
The .get_socket callback is never used by the PCMCIA core, therefore remove
it.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/yenta_socket.c')
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 8bfe72b71302..fa0625c438dc 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -224,95 +224,6 @@ static int yenta_get_status(struct pcmcia_socket *sock, unsigned int *value) | |||
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
226 | 226 | ||
227 | static void yenta_get_power(struct yenta_socket *socket, socket_state_t *state) | ||
228 | { | ||
229 | if (!(cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) && | ||
230 | (socket->flags & YENTA_16BIT_POWER_EXCA)) { | ||
231 | u8 reg, vcc, vpp; | ||
232 | |||
233 | reg = exca_readb(socket, I365_POWER); | ||
234 | vcc = reg & I365_VCC_MASK; | ||
235 | vpp = reg & I365_VPP1_MASK; | ||
236 | state->Vcc = state->Vpp = 0; | ||
237 | |||
238 | if (socket->flags & YENTA_16BIT_POWER_DF) { | ||
239 | if (vcc == I365_VCC_3V) | ||
240 | state->Vcc = 33; | ||
241 | if (vcc == I365_VCC_5V) | ||
242 | state->Vcc = 50; | ||
243 | if (vpp == I365_VPP1_5V) | ||
244 | state->Vpp = state->Vcc; | ||
245 | if (vpp == I365_VPP1_12V) | ||
246 | state->Vpp = 120; | ||
247 | } else { | ||
248 | if (reg & I365_VCC_5V) { | ||
249 | state->Vcc = 50; | ||
250 | if (vpp == I365_VPP1_5V) | ||
251 | state->Vpp = 50; | ||
252 | if (vpp == I365_VPP1_12V) | ||
253 | state->Vpp = 120; | ||
254 | } | ||
255 | } | ||
256 | } else { | ||
257 | u32 control; | ||
258 | |||
259 | control = cb_readl(socket, CB_SOCKET_CONTROL); | ||
260 | |||
261 | switch (control & CB_SC_VCC_MASK) { | ||
262 | case CB_SC_VCC_5V: state->Vcc = 50; break; | ||
263 | case CB_SC_VCC_3V: state->Vcc = 33; break; | ||
264 | default: state->Vcc = 0; | ||
265 | } | ||
266 | |||
267 | switch (control & CB_SC_VPP_MASK) { | ||
268 | case CB_SC_VPP_12V: state->Vpp = 120; break; | ||
269 | case CB_SC_VPP_5V: state->Vpp = 50; break; | ||
270 | case CB_SC_VPP_3V: state->Vpp = 33; break; | ||
271 | default: state->Vpp = 0; | ||
272 | } | ||
273 | } | ||
274 | } | ||
275 | |||
276 | static int yenta_get_socket(struct pcmcia_socket *sock, socket_state_t *state) | ||
277 | { | ||
278 | struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); | ||
279 | u8 reg; | ||
280 | u32 control; | ||
281 | |||
282 | control = cb_readl(socket, CB_SOCKET_CONTROL); | ||
283 | |||
284 | yenta_get_power(socket, state); | ||
285 | state->io_irq = socket->io_irq; | ||
286 | |||
287 | if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) { | ||
288 | u16 bridge = config_readw(socket, CB_BRIDGE_CONTROL); | ||
289 | if (bridge & CB_BRIDGE_CRST) | ||
290 | state->flags |= SS_RESET; | ||
291 | return 0; | ||
292 | } | ||
293 | |||
294 | /* 16-bit card state.. */ | ||
295 | reg = exca_readb(socket, I365_POWER); | ||
296 | state->flags = (reg & I365_PWR_AUTO) ? SS_PWR_AUTO : 0; | ||
297 | state->flags |= (reg & I365_PWR_OUT) ? SS_OUTPUT_ENA : 0; | ||
298 | |||
299 | reg = exca_readb(socket, I365_INTCTL); | ||
300 | state->flags |= (reg & I365_PC_RESET) ? 0 : SS_RESET; | ||
301 | state->flags |= (reg & I365_PC_IOCARD) ? SS_IOCARD : 0; | ||
302 | |||
303 | reg = exca_readb(socket, I365_CSCINT); | ||
304 | state->csc_mask = (reg & I365_CSC_DETECT) ? SS_DETECT : 0; | ||
305 | if (state->flags & SS_IOCARD) { | ||
306 | state->csc_mask |= (reg & I365_CSC_STSCHG) ? SS_STSCHG : 0; | ||
307 | } else { | ||
308 | state->csc_mask |= (reg & I365_CSC_BVD1) ? SS_BATDEAD : 0; | ||
309 | state->csc_mask |= (reg & I365_CSC_BVD2) ? SS_BATWARN : 0; | ||
310 | state->csc_mask |= (reg & I365_CSC_READY) ? SS_READY : 0; | ||
311 | } | ||
312 | |||
313 | return 0; | ||
314 | } | ||
315 | |||
316 | static void yenta_set_power(struct yenta_socket *socket, socket_state_t *state) | 227 | static void yenta_set_power(struct yenta_socket *socket, socket_state_t *state) |
317 | { | 228 | { |
318 | /* some birdges require to use the ExCA registers to power 16bit cards */ | 229 | /* some birdges require to use the ExCA registers to power 16bit cards */ |
@@ -828,7 +739,6 @@ static struct pccard_operations yenta_socket_operations = { | |||
828 | .init = yenta_sock_init, | 739 | .init = yenta_sock_init, |
829 | .suspend = yenta_sock_suspend, | 740 | .suspend = yenta_sock_suspend, |
830 | .get_status = yenta_get_status, | 741 | .get_status = yenta_get_status, |
831 | .get_socket = yenta_get_socket, | ||
832 | .set_socket = yenta_set_socket, | 742 | .set_socket = yenta_set_socket, |
833 | .set_io_map = yenta_set_io_map, | 743 | .set_io_map = yenta_set_io_map, |
834 | .set_mem_map = yenta_set_mem_map, | 744 | .set_mem_map = yenta_set_mem_map, |