aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2009-03-29 17:45:26 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-09 02:30:16 -0500
commit66024db57d5b9011e274b314affad68f370c0d6f (patch)
tree15094385300234e71fe3c9409860cf0c3535e1ac /drivers
parent1689164a272a962572a1f31af715dfe462cf7910 (diff)
PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket
skt->irq is a mere duplication of pcmcia_socket's pci_irq member. Get rid of it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/pxa2xx_base.c2
-rw-r--r--drivers/pcmcia/pxa2xx_cm_x255.c2
-rw-r--r--drivers/pcmcia/pxa2xx_cm_x270.c2
-rw-r--r--drivers/pcmcia/pxa2xx_e740.c2
-rw-r--r--drivers/pcmcia/pxa2xx_mainstone.c2
-rw-r--r--drivers/pcmcia/pxa2xx_palmld.c2
-rw-r--r--drivers/pcmcia/pxa2xx_palmtx.c2
-rw-r--r--drivers/pcmcia/pxa2xx_sharpsl.c2
-rw-r--r--drivers/pcmcia/pxa2xx_trizeps4.c4
-rw-r--r--drivers/pcmcia/pxa2xx_viper.c2
-rw-r--r--drivers/pcmcia/sa1100_assabet.c2
-rw-r--r--drivers/pcmcia/sa1100_cerf.c2
-rw-r--r--drivers/pcmcia/sa1100_h3600.c4
-rw-r--r--drivers/pcmcia/sa1100_shannon.c2
-rw-r--r--drivers/pcmcia/sa1100_simpad.c2
-rw-r--r--drivers/pcmcia/sa1111_generic.c2
-rw-r--r--drivers/pcmcia/sa11xx_base.c2
-rw-r--r--drivers/pcmcia/soc_common.c8
-rw-r--r--drivers/pcmcia/soc_common.h1
19 files changed, 23 insertions, 24 deletions
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 7f61b62a1de0..84dde7768ad5 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -287,10 +287,10 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
287 skt = &sinfo->skt[i]; 287 skt = &sinfo->skt[i];
288 288
289 skt->nr = ops->first + i; 289 skt->nr = ops->first + i;
290 skt->irq = NO_IRQ;
291 skt->ops = ops; 290 skt->ops = ops;
292 skt->socket.owner = ops->owner; 291 skt->socket.owner = ops->owner;
293 skt->socket.dev.parent = dev; 292 skt->socket.dev.parent = dev;
293 skt->socket.pci_irq = NO_IRQ;
294 294
295 ret = pxa2xx_drv_pcmcia_add_one(skt); 295 ret = pxa2xx_drv_pcmcia_add_one(skt);
296 if (ret) 296 if (ret)
diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c
index 5143a760153b..05913d0bbdbe 100644
--- a/drivers/pcmcia/pxa2xx_cm_x255.c
+++ b/drivers/pcmcia/pxa2xx_cm_x255.c
@@ -44,7 +44,7 @@ static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
44 return ret; 44 return ret;
45 gpio_direction_output(GPIO_PCMCIA_RESET, 0); 45 gpio_direction_output(GPIO_PCMCIA_RESET, 0);
46 46
47 skt->irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT; 47 skt->socket.pci_irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
48 ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 48 ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
49 if (!ret) 49 if (!ret)
50 gpio_free(GPIO_PCMCIA_RESET); 50 gpio_free(GPIO_PCMCIA_RESET);
diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c
index a7b943d01e34..5662646b84da 100644
--- a/drivers/pcmcia/pxa2xx_cm_x270.c
+++ b/drivers/pcmcia/pxa2xx_cm_x270.c
@@ -38,7 +38,7 @@ static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
38 return ret; 38 return ret;
39 gpio_direction_output(GPIO_PCMCIA_RESET, 0); 39 gpio_direction_output(GPIO_PCMCIA_RESET, 0);
40 40
41 skt->irq = PCMCIA_S0_RDYINT; 41 skt->socket.pci_irq = PCMCIA_S0_RDYINT;
42 ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 42 ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
43 if (!ret) 43 if (!ret)
44 gpio_free(GPIO_PCMCIA_RESET); 44 gpio_free(GPIO_PCMCIA_RESET);
diff --git a/drivers/pcmcia/pxa2xx_e740.c b/drivers/pcmcia/pxa2xx_e740.c
index d09c0dc4a31a..8bfbd4dca131 100644
--- a/drivers/pcmcia/pxa2xx_e740.c
+++ b/drivers/pcmcia/pxa2xx_e740.c
@@ -38,7 +38,7 @@ static struct pcmcia_irqs cd_irqs[] = {
38 38
39static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 39static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
40{ 40{
41 skt->irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) : 41 skt->socket.pci_irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) :
42 IRQ_GPIO(GPIO_E740_PCMCIA_RDY1); 42 IRQ_GPIO(GPIO_E740_PCMCIA_RDY1);
43 43
44 return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); 44 return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1);
diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c
index 1138551ba8f6..92016fe932b4 100644
--- a/drivers/pcmcia/pxa2xx_mainstone.c
+++ b/drivers/pcmcia/pxa2xx_mainstone.c
@@ -44,7 +44,7 @@ static int mst_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
44 * before we enable them as outputs. 44 * before we enable them as outputs.
45 */ 45 */
46 46
47 skt->irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ; 47 skt->socket.pci_irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ;
48 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 48 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
49} 49}
50 50
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c
index 5ba9b3664a00..6fb6f7f0672e 100644
--- a/drivers/pcmcia/pxa2xx_palmld.c
+++ b/drivers/pcmcia/pxa2xx_palmld.c
@@ -45,7 +45,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
45 if (ret) 45 if (ret)
46 goto err4; 46 goto err4;
47 47
48 skt->irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY); 48 skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
49 return 0; 49 return 0;
50 50
51err4: 51err4:
diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/drivers/pcmcia/pxa2xx_palmtx.c
index e07b5c51ec5b..b07b247a399f 100644
--- a/drivers/pcmcia/pxa2xx_palmtx.c
+++ b/drivers/pcmcia/pxa2xx_palmtx.c
@@ -53,7 +53,7 @@ static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
53 if (ret) 53 if (ret)
54 goto err5; 54 goto err5;
55 55
56 skt->irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY); 56 skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY);
57 return 0; 57 return 0;
58 58
59err5: 59err5:
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
index bc43f78f6f0b..0ea3b29440e6 100644
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -66,7 +66,7 @@ static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
66 } 66 }
67 } 67 }
68 68
69 skt->irq = SCOOP_DEV[skt->nr].irq; 69 skt->socket.pci_irq = SCOOP_DEV[skt->nr].irq;
70 70
71 return 0; 71 return 0;
72} 72}
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c
index e0e5cb339b4a..b7e596620db1 100644
--- a/drivers/pcmcia/pxa2xx_trizeps4.c
+++ b/drivers/pcmcia/pxa2xx_trizeps4.c
@@ -53,7 +53,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
53 gpio_free(GPIO_PRDY); 53 gpio_free(GPIO_PRDY);
54 return -EINVAL; 54 return -EINVAL;
55 } 55 }
56 skt->irq = IRQ_GPIO(GPIO_PRDY); 56 skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY);
57 break; 57 break;
58 58
59#ifndef CONFIG_MACH_TRIZEPS_CONXS 59#ifndef CONFIG_MACH_TRIZEPS_CONXS
@@ -63,7 +63,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
63 break; 63 break;
64 } 64 }
65 /* release the reset of this card */ 65 /* release the reset of this card */
66 pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->irq); 66 pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->socket.pci_irq);
67 67
68 /* supplementory irqs for the socket */ 68 /* supplementory irqs for the socket */
69 for (i = 0; i < ARRAY_SIZE(irqs); i++) { 69 for (i = 0; i < ARRAY_SIZE(irqs); i++) {
diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c
index 17871360fe99..27be2e154df2 100644
--- a/drivers/pcmcia/pxa2xx_viper.c
+++ b/drivers/pcmcia/pxa2xx_viper.c
@@ -40,7 +40,7 @@ static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
40{ 40{
41 unsigned long flags; 41 unsigned long flags;
42 42
43 skt->irq = gpio_to_irq(VIPER_CF_RDY_GPIO); 43 skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
44 44
45 if (gpio_request(VIPER_CF_CD_GPIO, "CF detect")) 45 if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
46 goto err_request_cd; 46 goto err_request_cd;
diff --git a/drivers/pcmcia/sa1100_assabet.c b/drivers/pcmcia/sa1100_assabet.c
index ac8aa09ba0da..fd013a1ef47a 100644
--- a/drivers/pcmcia/sa1100_assabet.c
+++ b/drivers/pcmcia/sa1100_assabet.c
@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
27 27
28static int assabet_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 28static int assabet_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
29{ 29{
30 skt->irq = ASSABET_IRQ_GPIO_CF_IRQ; 30 skt->socket.pci_irq = ASSABET_IRQ_GPIO_CF_IRQ;
31 31
32 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 32 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
33} 33}
diff --git a/drivers/pcmcia/sa1100_cerf.c b/drivers/pcmcia/sa1100_cerf.c
index 63e6bc431a0d..9bf088b17275 100644
--- a/drivers/pcmcia/sa1100_cerf.c
+++ b/drivers/pcmcia/sa1100_cerf.c
@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
27 27
28static int cerf_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 28static int cerf_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
29{ 29{
30 skt->irq = CERF_IRQ_GPIO_CF_IRQ; 30 skt->socket.pci_irq = CERF_IRQ_GPIO_CF_IRQ;
31 31
32 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 32 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
33} 33}
diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 0cc3748f3758..3a121ac697d6 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -25,8 +25,8 @@ static struct pcmcia_irqs irqs[] = {
25 25
26static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 26static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
27{ 27{
28 skt->irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1 28 skt->socket.pci_irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
29 : IRQ_GPIO_H3600_PCMCIA_IRQ0; 29 : IRQ_GPIO_H3600_PCMCIA_IRQ0;
30 30
31 31
32 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 32 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c
index 46d8c1977c2a..c4d51867a050 100644
--- a/drivers/pcmcia/sa1100_shannon.c
+++ b/drivers/pcmcia/sa1100_shannon.c
@@ -28,7 +28,7 @@ static int shannon_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
28 GAFR &= ~(SHANNON_GPIO_EJECT_0 | SHANNON_GPIO_EJECT_1 | 28 GAFR &= ~(SHANNON_GPIO_EJECT_0 | SHANNON_GPIO_EJECT_1 |
29 SHANNON_GPIO_RDY_0 | SHANNON_GPIO_RDY_1); 29 SHANNON_GPIO_RDY_0 | SHANNON_GPIO_RDY_1);
30 30
31 skt->irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0; 31 skt->socket.pci_irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0;
32 32
33 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 33 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
34} 34}
diff --git a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c
index 33a08ae09fdf..05bd504e6f18 100644
--- a/drivers/pcmcia/sa1100_simpad.c
+++ b/drivers/pcmcia/sa1100_simpad.c
@@ -28,7 +28,7 @@ static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
28 28
29 clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); 29 clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
30 30
31 skt->irq = IRQ_GPIO_CF_IRQ; 31 skt->socket.pci_irq = IRQ_GPIO_CF_IRQ;
32 32
33 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 33 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
34} 34}
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 219860aba818..deb5036ee5fb 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -137,10 +137,10 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
137 return -ENOMEM; 137 return -ENOMEM;
138 138
139 s->soc.nr = ops->first + i; 139 s->soc.nr = ops->first + i;
140 s->soc.irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
141 s->soc.ops = ops; 140 s->soc.ops = ops;
142 s->soc.socket.owner = ops->owner; 141 s->soc.socket.owner = ops->owner;
143 s->soc.socket.dev.parent = &dev->dev; 142 s->soc.socket.dev.parent = &dev->dev;
143 s->soc.socket.pci_irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
144 s->dev = dev; 144 s->dev = dev;
145 145
146 ret = add(&s->soc); 146 ret = add(&s->soc);
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c
index ac9987243131..fc9a6527019b 100644
--- a/drivers/pcmcia/sa11xx_base.c
+++ b/drivers/pcmcia/sa11xx_base.c
@@ -235,10 +235,10 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
235 skt = &sinfo->skt[i]; 235 skt = &sinfo->skt[i];
236 236
237 skt->nr = first + i; 237 skt->nr = first + i;
238 skt->irq = NO_IRQ;
239 skt->ops = ops; 238 skt->ops = ops;
240 skt->socket.owner = ops->owner; 239 skt->socket.owner = ops->owner;
241 skt->socket.dev.parent = dev; 240 skt->socket.dev.parent = dev;
241 skt->socket.pci_irq = NO_IRQ;
242 242
243 ret = sa11xx_drv_pcmcia_add_one(skt); 243 ret = sa11xx_drv_pcmcia_add_one(skt);
244 if (ret) 244 if (ret)
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 6bc60f84a44a..6f1a86b43c60 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -144,10 +144,10 @@ soc_common_pcmcia_config_skt(struct soc_pcmcia_socket *skt, socket_state_t *stat
144 */ 144 */
145 if (skt->irq_state != 1 && state->io_irq) { 145 if (skt->irq_state != 1 && state->io_irq) {
146 skt->irq_state = 1; 146 skt->irq_state = 1;
147 set_irq_type(skt->irq, IRQ_TYPE_EDGE_FALLING); 147 set_irq_type(skt->socket.pci_irq, IRQ_TYPE_EDGE_FALLING);
148 } else if (skt->irq_state == 1 && state->io_irq == 0) { 148 } else if (skt->irq_state == 1 && state->io_irq == 0) {
149 skt->irq_state = 0; 149 skt->irq_state = 0;
150 set_irq_type(skt->irq, IRQ_TYPE_NONE); 150 set_irq_type(skt->socket.pci_irq, IRQ_TYPE_NONE);
151 } 151 }
152 152
153 skt->cs_state = *state; 153 skt->cs_state = *state;
@@ -492,7 +492,8 @@ static ssize_t show_status(struct device *dev, struct device_attribute *attr, ch
492 492
493 p+=sprintf(p, "Vcc : %d\n", skt->cs_state.Vcc); 493 p+=sprintf(p, "Vcc : %d\n", skt->cs_state.Vcc);
494 p+=sprintf(p, "Vpp : %d\n", skt->cs_state.Vpp); 494 p+=sprintf(p, "Vpp : %d\n", skt->cs_state.Vpp);
495 p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq, skt->irq); 495 p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq,
496 skt->socket.pci_irq);
496 if (skt->ops->show_timing) 497 if (skt->ops->show_timing)
497 p+=skt->ops->show_timing(skt, p); 498 p+=skt->ops->show_timing(skt, p);
498 499
@@ -695,7 +696,6 @@ int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt)
695 skt->socket.resource_ops = &pccard_static_ops; 696 skt->socket.resource_ops = &pccard_static_ops;
696 skt->socket.irq_mask = 0; 697 skt->socket.irq_mask = 0;
697 skt->socket.map_size = PAGE_SIZE; 698 skt->socket.map_size = PAGE_SIZE;
698 skt->socket.pci_irq = skt->irq;
699 skt->socket.io_offset = (unsigned long)skt->virt_io; 699 skt->socket.io_offset = (unsigned long)skt->virt_io;
700 700
701 skt->status = soc_common_pcmcia_skt_state(skt); 701 skt->status = soc_common_pcmcia_skt_state(skt);
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index 4fb06f797ad6..e40824ce6b0b 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -31,7 +31,6 @@ struct soc_pcmcia_socket {
31 * Info from low level handler 31 * Info from low level handler
32 */ 32 */
33 unsigned int nr; 33 unsigned int nr;
34 unsigned int irq;
35 34
36 /* 35 /*
37 * Core PCMCIA state 36 * Core PCMCIA state