Commit 88d681e2 authored by Russell King's avatar Russell King

[PCMCIA] pcmcia-4: introduce SOCKET_CARDBUS_CONFIG

Cardbus uses socket->cb_config to detect when the cardbus card has
been initialised.  Since cb_config will eventually die, we need a
solution - introduce the SOCKET_CARDBUS_CONFIG flag, which is set
once we have initialised the cardbus socket.
parent 5e547967
No related merge requests found
......@@ -621,8 +621,10 @@ static void unreset_socket(socket_info_t *s)
send_event(s, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
} else if (s->state & SOCKET_SETUP_PENDING) {
#ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS)
if (s->state & SOCKET_CARDBUS) {
cb_alloc(s);
s->state |= SOCKET_CARDBUS_CONFIG;
}
#endif
send_event(s, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
s->state &= ~SOCKET_SETUP_PENDING;
......@@ -1072,7 +1074,7 @@ int pcmcia_get_configuration_info(client_handle_t handle,
config->Vcc = s->socket.Vcc;
config->Vpp1 = config->Vpp2 = s->socket.Vpp;
config->Option = s->cap.cb_dev->subordinate->number;
if (s->cb_config) {
if (s->state & SOCKET_CARDBUS_CONFIG) {
config->Attributes = CONF_VALID_CLIENT;
config->IntType = INT_CARDBUS;
config->AssignedIRQ = s->irq.AssignedIRQ;
......
......@@ -176,6 +176,7 @@ typedef struct socket_info_t {
#define SOCKET_IO_REQ(i) (0x1000<<(i))
#define SOCKET_REGION_INFO 0x4000
#define SOCKET_CARDBUS 0x8000
#define SOCKET_CARDBUS_CONFIG 0x10000
#define CHECK_HANDLE(h) \
(((h) == NULL) || ((h)->client_magic != CLIENT_MAGIC))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment