diff options
author | Daniel Ritz <daniel.ritz-ml@swissonline.ch> | 2006-03-06 11:37:04 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-06-30 16:09:09 -0400 |
commit | d250a4810402ec68f64802b66340a0e70c61cbd3 (patch) | |
tree | 4e14ab711399b60f0863ee90260be97f3aa4cfb6 /drivers/pcmcia | |
parent | 598736c55622f7ea65b98f93c825ff95c433877c (diff) |
[PATCH] yenta: do power-up only after socket is configured
Power-up the card only after the socket is configured. power-down in
the old place. The point is not to power-up the card before the interrupt
routing is set up correctly.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 4145eb83b9b6..006749dc8d75 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -287,7 +287,10 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
287 | struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); | 287 | struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); |
288 | u16 bridge; | 288 | u16 bridge; |
289 | 289 | ||
290 | yenta_set_power(socket, state); | 290 | /* if powering down: do it immediately */ |
291 | if (state->Vcc == 0) | ||
292 | yenta_set_power(socket, state); | ||
293 | |||
291 | socket->io_irq = state->io_irq; | 294 | socket->io_irq = state->io_irq; |
292 | bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~(CB_BRIDGE_CRST | CB_BRIDGE_INTR); | 295 | bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~(CB_BRIDGE_CRST | CB_BRIDGE_INTR); |
293 | if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) { | 296 | if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) { |
@@ -339,6 +342,10 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
339 | /* Socket event mask: get card insert/remove events.. */ | 342 | /* Socket event mask: get card insert/remove events.. */ |
340 | cb_writel(socket, CB_SOCKET_EVENT, -1); | 343 | cb_writel(socket, CB_SOCKET_EVENT, -1); |
341 | cb_writel(socket, CB_SOCKET_MASK, CB_CDMASK); | 344 | cb_writel(socket, CB_SOCKET_MASK, CB_CDMASK); |
345 | |||
346 | /* if powering up: do it as the last step when the socket is configured */ | ||
347 | if (state->Vcc != 0) | ||
348 | yenta_set_power(socket, state); | ||
342 | return 0; | 349 | return 0; |
343 | } | 350 | } |
344 | 351 | ||