Commit 66024db5 authored by Russell King - ARM Linux's avatar Russell King - ARM Linux Committed by Dominik Brodowski

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 1689164a
...@@ -287,10 +287,10 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev) ...@@ -287,10 +287,10 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
skt = &sinfo->skt[i]; skt = &sinfo->skt[i];
skt->nr = ops->first + i; skt->nr = ops->first + i;
skt->irq = NO_IRQ;
skt->ops = ops; skt->ops = ops;
skt->socket.owner = ops->owner; skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev; skt->socket.dev.parent = dev;
skt->socket.pci_irq = NO_IRQ;
ret = pxa2xx_drv_pcmcia_add_one(skt); ret = pxa2xx_drv_pcmcia_add_one(skt);
if (ret) if (ret)
......
...@@ -44,7 +44,7 @@ static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -44,7 +44,7 @@ static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
return ret; return ret;
gpio_direction_output(GPIO_PCMCIA_RESET, 0); gpio_direction_output(GPIO_PCMCIA_RESET, 0);
skt->irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT; skt->socket.pci_irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret) if (!ret)
gpio_free(GPIO_PCMCIA_RESET); gpio_free(GPIO_PCMCIA_RESET);
......
...@@ -38,7 +38,7 @@ static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -38,7 +38,7 @@ static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
return ret; return ret;
gpio_direction_output(GPIO_PCMCIA_RESET, 0); gpio_direction_output(GPIO_PCMCIA_RESET, 0);
skt->irq = PCMCIA_S0_RDYINT; skt->socket.pci_irq = PCMCIA_S0_RDYINT;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret) if (!ret)
gpio_free(GPIO_PCMCIA_RESET); gpio_free(GPIO_PCMCIA_RESET);
......
...@@ -38,7 +38,7 @@ static struct pcmcia_irqs cd_irqs[] = { ...@@ -38,7 +38,7 @@ static struct pcmcia_irqs cd_irqs[] = {
static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{ {
skt->irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) : skt->socket.pci_irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) :
IRQ_GPIO(GPIO_E740_PCMCIA_RDY1); IRQ_GPIO(GPIO_E740_PCMCIA_RDY1);
return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1);
......
...@@ -44,7 +44,7 @@ static int mst_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -44,7 +44,7 @@ static int mst_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
* before we enable them as outputs. * before we enable them as outputs.
*/ */
skt->irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ; skt->socket.pci_irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
} }
......
...@@ -45,7 +45,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -45,7 +45,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
if (ret) if (ret)
goto err4; goto err4;
skt->irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY); skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
return 0; return 0;
err4: err4:
......
...@@ -53,7 +53,7 @@ static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -53,7 +53,7 @@ static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
if (ret) if (ret)
goto err5; goto err5;
skt->irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY); skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY);
return 0; return 0;
err5: err5:
......
...@@ -66,7 +66,7 @@ static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -66,7 +66,7 @@ static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
} }
} }
skt->irq = SCOOP_DEV[skt->nr].irq; skt->socket.pci_irq = SCOOP_DEV[skt->nr].irq;
return 0; return 0;
} }
......
...@@ -53,7 +53,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -53,7 +53,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
gpio_free(GPIO_PRDY); gpio_free(GPIO_PRDY);
return -EINVAL; return -EINVAL;
} }
skt->irq = IRQ_GPIO(GPIO_PRDY); skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY);
break; break;
#ifndef CONFIG_MACH_TRIZEPS_CONXS #ifndef CONFIG_MACH_TRIZEPS_CONXS
...@@ -63,7 +63,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -63,7 +63,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
break; break;
} }
/* release the reset of this card */ /* release the reset of this card */
pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->irq); pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->socket.pci_irq);
/* supplementory irqs for the socket */ /* supplementory irqs for the socket */
for (i = 0; i < ARRAY_SIZE(irqs); i++) { for (i = 0; i < ARRAY_SIZE(irqs); i++) {
......
...@@ -40,7 +40,7 @@ static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -40,7 +40,7 @@ static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{ {
unsigned long flags; unsigned long flags;
skt->irq = gpio_to_irq(VIPER_CF_RDY_GPIO); skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
if (gpio_request(VIPER_CF_CD_GPIO, "CF detect")) if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
goto err_request_cd; goto err_request_cd;
......
...@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = { ...@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
static int assabet_pcmcia_hw_init(struct soc_pcmcia_socket *skt) static int assabet_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{ {
skt->irq = ASSABET_IRQ_GPIO_CF_IRQ; skt->socket.pci_irq = ASSABET_IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
} }
......
...@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = { ...@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
static int cerf_pcmcia_hw_init(struct soc_pcmcia_socket *skt) static int cerf_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{ {
skt->irq = CERF_IRQ_GPIO_CF_IRQ; skt->socket.pci_irq = CERF_IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
} }
......
...@@ -25,8 +25,8 @@ static struct pcmcia_irqs irqs[] = { ...@@ -25,8 +25,8 @@ static struct pcmcia_irqs irqs[] = {
static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt) static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{ {
skt->irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1 skt->socket.pci_irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
: IRQ_GPIO_H3600_PCMCIA_IRQ0; : IRQ_GPIO_H3600_PCMCIA_IRQ0;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
......
...@@ -28,7 +28,7 @@ static int shannon_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -28,7 +28,7 @@ static int shannon_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
GAFR &= ~(SHANNON_GPIO_EJECT_0 | SHANNON_GPIO_EJECT_1 | GAFR &= ~(SHANNON_GPIO_EJECT_0 | SHANNON_GPIO_EJECT_1 |
SHANNON_GPIO_RDY_0 | SHANNON_GPIO_RDY_1); SHANNON_GPIO_RDY_0 | SHANNON_GPIO_RDY_1);
skt->irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0; skt->socket.pci_irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
} }
......
...@@ -28,7 +28,7 @@ static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -28,7 +28,7 @@ static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
skt->irq = IRQ_GPIO_CF_IRQ; skt->socket.pci_irq = IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
} }
......
...@@ -137,10 +137,10 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops, ...@@ -137,10 +137,10 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
return -ENOMEM; return -ENOMEM;
s->soc.nr = ops->first + i; s->soc.nr = ops->first + i;
s->soc.irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
s->soc.ops = ops; s->soc.ops = ops;
s->soc.socket.owner = ops->owner; s->soc.socket.owner = ops->owner;
s->soc.socket.dev.parent = &dev->dev; s->soc.socket.dev.parent = &dev->dev;
s->soc.socket.pci_irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
s->dev = dev; s->dev = dev;
ret = add(&s->soc); ret = add(&s->soc);
......
...@@ -235,10 +235,10 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, ...@@ -235,10 +235,10 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
skt = &sinfo->skt[i]; skt = &sinfo->skt[i];
skt->nr = first + i; skt->nr = first + i;
skt->irq = NO_IRQ;
skt->ops = ops; skt->ops = ops;
skt->socket.owner = ops->owner; skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev; skt->socket.dev.parent = dev;
skt->socket.pci_irq = NO_IRQ;
ret = sa11xx_drv_pcmcia_add_one(skt); ret = sa11xx_drv_pcmcia_add_one(skt);
if (ret) if (ret)
......
...@@ -144,10 +144,10 @@ soc_common_pcmcia_config_skt(struct soc_pcmcia_socket *skt, socket_state_t *stat ...@@ -144,10 +144,10 @@ soc_common_pcmcia_config_skt(struct soc_pcmcia_socket *skt, socket_state_t *stat
*/ */
if (skt->irq_state != 1 && state->io_irq) { if (skt->irq_state != 1 && state->io_irq) {
skt->irq_state = 1; skt->irq_state = 1;
set_irq_type(skt->irq, IRQ_TYPE_EDGE_FALLING); set_irq_type(skt->socket.pci_irq, IRQ_TYPE_EDGE_FALLING);
} else if (skt->irq_state == 1 && state->io_irq == 0) { } else if (skt->irq_state == 1 && state->io_irq == 0) {
skt->irq_state = 0; skt->irq_state = 0;
set_irq_type(skt->irq, IRQ_TYPE_NONE); set_irq_type(skt->socket.pci_irq, IRQ_TYPE_NONE);
} }
skt->cs_state = *state; skt->cs_state = *state;
...@@ -492,7 +492,8 @@ static ssize_t show_status(struct device *dev, struct device_attribute *attr, ch ...@@ -492,7 +492,8 @@ static ssize_t show_status(struct device *dev, struct device_attribute *attr, ch
p+=sprintf(p, "Vcc : %d\n", skt->cs_state.Vcc); p+=sprintf(p, "Vcc : %d\n", skt->cs_state.Vcc);
p+=sprintf(p, "Vpp : %d\n", skt->cs_state.Vpp); p+=sprintf(p, "Vpp : %d\n", skt->cs_state.Vpp);
p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq, skt->irq); p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq,
skt->socket.pci_irq);
if (skt->ops->show_timing) if (skt->ops->show_timing)
p+=skt->ops->show_timing(skt, p); p+=skt->ops->show_timing(skt, p);
...@@ -695,7 +696,6 @@ int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt) ...@@ -695,7 +696,6 @@ int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt)
skt->socket.resource_ops = &pccard_static_ops; skt->socket.resource_ops = &pccard_static_ops;
skt->socket.irq_mask = 0; skt->socket.irq_mask = 0;
skt->socket.map_size = PAGE_SIZE; skt->socket.map_size = PAGE_SIZE;
skt->socket.pci_irq = skt->irq;
skt->socket.io_offset = (unsigned long)skt->virt_io; skt->socket.io_offset = (unsigned long)skt->virt_io;
skt->status = soc_common_pcmcia_skt_state(skt); skt->status = soc_common_pcmcia_skt_state(skt);
......
...@@ -31,7 +31,6 @@ struct soc_pcmcia_socket { ...@@ -31,7 +31,6 @@ struct soc_pcmcia_socket {
* Info from low level handler * Info from low level handler
*/ */
unsigned int nr; unsigned int nr;
unsigned int irq;
/* /*
* Core PCMCIA state * Core PCMCIA state
......
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