aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pxa2xx_balloon3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/pxa2xx_balloon3.c')
-rw-r--r--drivers/pcmcia/pxa2xx_balloon3.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c
index 22a75e610f12..2ef576c5b69d 100644
--- a/drivers/pcmcia/pxa2xx_balloon3.c
+++ b/drivers/pcmcia/pxa2xx_balloon3.c
@@ -29,15 +29,6 @@
29 29
30#include "soc_common.h" 30#include "soc_common.h"
31 31
32/*
33 * These are a list of interrupt sources that provokes a polled
34 * check of status
35 */
36static struct pcmcia_irqs irqs[] = {
37 { 0, BALLOON3_S0_CD_IRQ, "PCMCIA0 CD" },
38 { 0, BALLOON3_BP_NSTSCHG_IRQ, "PCMCIA0 STSCHG" },
39};
40
41static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 32static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
42{ 33{
43 uint16_t ver; 34 uint16_t ver;
@@ -49,12 +40,12 @@ static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
49 ver); 40 ver);
50 41
51 skt->socket.pci_irq = BALLOON3_BP_CF_NRDY_IRQ; 42 skt->socket.pci_irq = BALLOON3_BP_CF_NRDY_IRQ;
52 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 43 skt->stat[SOC_STAT_CD].gpio = BALLOON3_GPIO_S0_CD;
53} 44 skt->stat[SOC_STAT_CD].name = "PCMCIA0 CD";
45 skt->stat[SOC_STAT_BVD1].irq = BALLOON3_BP_NSTSCHG_IRQ;
46 skt->stat[SOC_STAT_BVD1].name = "PCMCIA0 STSCHG";
54 47
55static void balloon3_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) 48 return 0;
56{
57 soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
58} 49}
59 50
60static unsigned long balloon3_pcmcia_status[2] = { 51static unsigned long balloon3_pcmcia_status[2] = {
@@ -85,13 +76,11 @@ static void balloon3_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
85 disable_irq(BALLOON3_BP_NSTSCHG_IRQ); 76 disable_irq(BALLOON3_BP_NSTSCHG_IRQ);
86 } 77 }
87 78
88 state->detect = !gpio_get_value(BALLOON3_GPIO_S0_CD);
89 state->ready = !!(status & BALLOON3_CF_nIRQ); 79 state->ready = !!(status & BALLOON3_CF_nIRQ);
90 state->bvd1 = !!(status & BALLOON3_CF_nSTSCHG_BVD1); 80 state->bvd1 = !!(status & BALLOON3_CF_nSTSCHG_BVD1);
91 state->bvd2 = 0; /* not available */ 81 state->bvd2 = 0; /* not available */
92 state->vs_3v = 1; /* Always true its a CF card */ 82 state->vs_3v = 1; /* Always true its a CF card */
93 state->vs_Xv = 0; /* not available */ 83 state->vs_Xv = 0; /* not available */
94 state->wrprot = 0; /* not available */
95} 84}
96 85
97static int balloon3_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, 86static int balloon3_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
@@ -106,7 +95,6 @@ static int balloon3_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
106static struct pcmcia_low_level balloon3_pcmcia_ops = { 95static struct pcmcia_low_level balloon3_pcmcia_ops = {
107 .owner = THIS_MODULE, 96 .owner = THIS_MODULE,
108 .hw_init = balloon3_pcmcia_hw_init, 97 .hw_init = balloon3_pcmcia_hw_init,
109 .hw_shutdown = balloon3_pcmcia_hw_shutdown,
110 .socket_state = balloon3_pcmcia_socket_state, 98 .socket_state = balloon3_pcmcia_socket_state,
111 .configure_socket = balloon3_pcmcia_configure_socket, 99 .configure_socket = balloon3_pcmcia_configure_socket,
112 .first = 0, 100 .first = 0,