diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/pxa2xx_cm_x255.c | 16 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_cm_x270.c | 9 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_e740.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_palmld.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_palmtc.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_stargate2.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_trizeps4.c | 5 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_vpac270.c | 4 |
8 files changed, 30 insertions, 25 deletions
diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c index 0b4f946cf13a..31ab6ddf52c9 100644 --- a/drivers/pcmcia/pxa2xx_cm_x255.c +++ b/drivers/pcmcia/pxa2xx_cm_x255.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/export.h> | 17 | #include <linux/export.h> |
18 | 18 | ||
19 | #include <asm/mach-types.h> | ||
20 | |||
21 | #include "soc_common.h" | 19 | #include "soc_common.h" |
22 | 20 | ||
23 | #define GPIO_PCMCIA_SKTSEL (54) | 21 | #define GPIO_PCMCIA_SKTSEL (54) |
@@ -27,15 +25,15 @@ | |||
27 | #define GPIO_PCMCIA_S1_RDYINT (8) | 25 | #define GPIO_PCMCIA_S1_RDYINT (8) |
28 | #define GPIO_PCMCIA_RESET (9) | 26 | #define GPIO_PCMCIA_RESET (9) |
29 | 27 | ||
30 | #define PCMCIA_S0_CD_VALID IRQ_GPIO(GPIO_PCMCIA_S0_CD_VALID) | 28 | #define PCMCIA_S0_CD_VALID gpio_to_irq(GPIO_PCMCIA_S0_CD_VALID) |
31 | #define PCMCIA_S1_CD_VALID IRQ_GPIO(GPIO_PCMCIA_S1_CD_VALID) | 29 | #define PCMCIA_S1_CD_VALID gpio_to_irq(GPIO_PCMCIA_S1_CD_VALID) |
32 | #define PCMCIA_S0_RDYINT IRQ_GPIO(GPIO_PCMCIA_S0_RDYINT) | 30 | #define PCMCIA_S0_RDYINT gpio_to_irq(GPIO_PCMCIA_S0_RDYINT) |
33 | #define PCMCIA_S1_RDYINT IRQ_GPIO(GPIO_PCMCIA_S1_RDYINT) | 31 | #define PCMCIA_S1_RDYINT gpio_to_irq(GPIO_PCMCIA_S1_RDYINT) |
34 | 32 | ||
35 | 33 | ||
36 | static struct pcmcia_irqs irqs[] = { | 34 | static struct pcmcia_irqs irqs[] = { |
37 | { 0, PCMCIA_S0_CD_VALID, "PCMCIA0 CD" }, | 35 | { .sock = 0, .str = "PCMCIA0 CD" }, |
38 | { 1, PCMCIA_S1_CD_VALID, "PCMCIA1 CD" }, | 36 | { .sock = 1, .str = "PCMCIA1 CD" }, |
39 | }; | 37 | }; |
40 | 38 | ||
41 | static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 39 | static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
@@ -46,6 +44,8 @@ static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
46 | gpio_direction_output(GPIO_PCMCIA_RESET, 0); | 44 | gpio_direction_output(GPIO_PCMCIA_RESET, 0); |
47 | 45 | ||
48 | skt->socket.pci_irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT; | 46 | skt->socket.pci_irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT; |
47 | irqs[0].irq = PCMCIA_S0_CD_VALID; | ||
48 | irqs[1].irq = PCMCIA_S1_CD_VALID; | ||
49 | ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); | 49 | ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); |
50 | if (!ret) | 50 | if (!ret) |
51 | gpio_free(GPIO_PCMCIA_RESET); | 51 | gpio_free(GPIO_PCMCIA_RESET); |
diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c index 923f315926ef..3dc7621a0767 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/drivers/pcmcia/pxa2xx_cm_x270.c | |||
@@ -16,20 +16,18 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/export.h> | 17 | #include <linux/export.h> |
18 | 18 | ||
19 | #include <asm/mach-types.h> | ||
20 | |||
21 | #include "soc_common.h" | 19 | #include "soc_common.h" |
22 | 20 | ||
23 | #define GPIO_PCMCIA_S0_CD_VALID (84) | 21 | #define GPIO_PCMCIA_S0_CD_VALID (84) |
24 | #define GPIO_PCMCIA_S0_RDYINT (82) | 22 | #define GPIO_PCMCIA_S0_RDYINT (82) |
25 | #define GPIO_PCMCIA_RESET (53) | 23 | #define GPIO_PCMCIA_RESET (53) |
26 | 24 | ||
27 | #define PCMCIA_S0_CD_VALID IRQ_GPIO(GPIO_PCMCIA_S0_CD_VALID) | 25 | #define PCMCIA_S0_CD_VALID gpio_to_irq(GPIO_PCMCIA_S0_CD_VALID) |
28 | #define PCMCIA_S0_RDYINT IRQ_GPIO(GPIO_PCMCIA_S0_RDYINT) | 26 | #define PCMCIA_S0_RDYINT gpio_to_irq(GPIO_PCMCIA_S0_RDYINT) |
29 | 27 | ||
30 | 28 | ||
31 | static struct pcmcia_irqs irqs[] = { | 29 | static struct pcmcia_irqs irqs[] = { |
32 | { 0, PCMCIA_S0_CD_VALID, "PCMCIA0 CD" }, | 30 | { .sock = 0, .str = "PCMCIA0 CD" }, |
33 | }; | 31 | }; |
34 | 32 | ||
35 | static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 33 | static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
@@ -40,6 +38,7 @@ static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
40 | gpio_direction_output(GPIO_PCMCIA_RESET, 0); | 38 | gpio_direction_output(GPIO_PCMCIA_RESET, 0); |
41 | 39 | ||
42 | skt->socket.pci_irq = PCMCIA_S0_RDYINT; | 40 | skt->socket.pci_irq = PCMCIA_S0_RDYINT; |
41 | irqs[0].irq = PCMCIA_S0_CD_VALID; | ||
43 | ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); | 42 | ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); |
44 | if (!ret) | 43 | if (!ret) |
45 | 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 8bfbd4dca131..17cd2ce7428f 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/drivers/pcmcia/pxa2xx_e740.c | |||
@@ -26,20 +26,23 @@ | |||
26 | static struct pcmcia_irqs cd_irqs[] = { | 26 | static struct pcmcia_irqs cd_irqs[] = { |
27 | { | 27 | { |
28 | .sock = 0, | 28 | .sock = 0, |
29 | .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD0), | ||
30 | .str = "CF card detect" | 29 | .str = "CF card detect" |
31 | }, | 30 | }, |
32 | { | 31 | { |
33 | .sock = 1, | 32 | .sock = 1, |
34 | .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD1), | ||
35 | .str = "Wifi switch" | 33 | .str = "Wifi switch" |
36 | }, | 34 | }, |
37 | }; | 35 | }; |
38 | 36 | ||
39 | static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 37 | static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
40 | { | 38 | { |
41 | skt->socket.pci_irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) : | 39 | if (skt->nr == 0) |
42 | IRQ_GPIO(GPIO_E740_PCMCIA_RDY1); | 40 | skt->socket.pci_irq = gpio_to_irq(GPIO_E740_PCMCIA_RDY0); |
41 | else | ||
42 | skt->socket.pci_irq = gpio_to_irq(GPIO_E740_PCMCIA_RDY1); | ||
43 | |||
44 | cd_irqs[0].irq = gpio_to_irq(GPIO_E740_PCMCIA_CD0); | ||
45 | cd_irqs[1].irq = gpio_to_irq(GPIO_E740_PCMCIA_CD1); | ||
43 | 46 | ||
44 | return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); | 47 | return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); |
45 | } | 48 | } |
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c index d589ad1dcd4c..6a8e011a8c13 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/drivers/pcmcia/pxa2xx_palmld.c | |||
@@ -33,7 +33,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
33 | ret = gpio_request_array(palmld_pcmcia_gpios, | 33 | ret = gpio_request_array(palmld_pcmcia_gpios, |
34 | ARRAY_SIZE(palmld_pcmcia_gpios)); | 34 | ARRAY_SIZE(palmld_pcmcia_gpios)); |
35 | 35 | ||
36 | skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY); | 36 | skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMLD_PCMCIA_READY); |
37 | 37 | ||
38 | return ret; | 38 | return ret; |
39 | } | 39 | } |
diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c index 9c6a04b2f71b..9e38de769ba3 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/drivers/pcmcia/pxa2xx_palmtc.c | |||
@@ -37,7 +37,7 @@ static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
37 | ret = gpio_request_array(palmtc_pcmcia_gpios, | 37 | ret = gpio_request_array(palmtc_pcmcia_gpios, |
38 | ARRAY_SIZE(palmtc_pcmcia_gpios)); | 38 | ARRAY_SIZE(palmtc_pcmcia_gpios)); |
39 | 39 | ||
40 | skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); | 40 | skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTC_PCMCIA_READY); |
41 | 41 | ||
42 | return ret; | 42 | return ret; |
43 | } | 43 | } |
diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/drivers/pcmcia/pxa2xx_stargate2.c index 939622251dfb..6c2366b74a35 100644 --- a/drivers/pcmcia/pxa2xx_stargate2.c +++ b/drivers/pcmcia/pxa2xx_stargate2.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define SG2_S0_GPIO_READY 81 | 34 | #define SG2_S0_GPIO_READY 81 |
35 | 35 | ||
36 | static struct pcmcia_irqs irqs[] = { | 36 | static struct pcmcia_irqs irqs[] = { |
37 | { 0, IRQ_GPIO(SG2_S0_GPIO_DETECT), "PCMCIA0 CD" }, | 37 | {.sock = 0, .str = "PCMCIA0 CD" }, |
38 | }; | 38 | }; |
39 | 39 | ||
40 | static struct gpio sg2_pcmcia_gpios[] = { | 40 | static struct gpio sg2_pcmcia_gpios[] = { |
@@ -44,7 +44,9 @@ static struct gpio sg2_pcmcia_gpios[] = { | |||
44 | 44 | ||
45 | static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 45 | static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
46 | { | 46 | { |
47 | skt->socket.pci_irq = IRQ_GPIO(SG2_S0_GPIO_READY); | 47 | skt->socket.pci_irq = gpio_to_irq(SG2_S0_GPIO_READY); |
48 | irqs[0].irq = gpio_to_irq(SG2_S0_GPIO_DETECT); | ||
49 | |||
48 | return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); | 50 | return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); |
49 | } | 51 | } |
50 | 52 | ||
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c index 57ddb969d888..7c33f898135a 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/drivers/pcmcia/pxa2xx_trizeps4.c | |||
@@ -30,7 +30,7 @@ | |||
30 | extern void board_pcmcia_power(int power); | 30 | extern void board_pcmcia_power(int power); |
31 | 31 | ||
32 | static struct pcmcia_irqs irqs[] = { | 32 | static struct pcmcia_irqs irqs[] = { |
33 | { 0, IRQ_GPIO(GPIO_PCD), "cs0_cd" } | 33 | { .sock = 0, .str = "cs0_cd" } |
34 | /* on other baseboards we can have more inputs */ | 34 | /* on other baseboards we can have more inputs */ |
35 | }; | 35 | }; |
36 | 36 | ||
@@ -53,7 +53,8 @@ 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->socket.pci_irq = IRQ_GPIO(GPIO_PRDY); | 56 | skt->socket.pci_irq = gpio_to_irq(GPIO_PRDY); |
57 | irqs[0].irq = gpio_to_irq(GPIO_PCD); | ||
57 | break; | 58 | break; |
58 | default: | 59 | default: |
59 | break; | 60 | break; |
diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/drivers/pcmcia/pxa2xx_vpac270.c index 66ab92cf3105..61b17d235dbe 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/drivers/pcmcia/pxa2xx_vpac270.c | |||
@@ -38,12 +38,10 @@ static struct gpio vpac270_cf_gpios[] = { | |||
38 | static struct pcmcia_irqs cd_irqs[] = { | 38 | static struct pcmcia_irqs cd_irqs[] = { |
39 | { | 39 | { |
40 | .sock = 0, | 40 | .sock = 0, |
41 | .irq = IRQ_GPIO(GPIO84_VPAC270_PCMCIA_CD), | ||
42 | .str = "PCMCIA CD" | 41 | .str = "PCMCIA CD" |
43 | }, | 42 | }, |
44 | { | 43 | { |
45 | .sock = 1, | 44 | .sock = 1, |
46 | .irq = IRQ_GPIO(GPIO17_VPAC270_CF_CD), | ||
47 | .str = "CF CD" | 45 | .str = "CF CD" |
48 | }, | 46 | }, |
49 | }; | 47 | }; |
@@ -57,6 +55,7 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
57 | ARRAY_SIZE(vpac270_pcmcia_gpios)); | 55 | ARRAY_SIZE(vpac270_pcmcia_gpios)); |
58 | 56 | ||
59 | skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY); | 57 | skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY); |
58 | cd_irqs[0].irq = gpio_to_irq(GPIO84_VPAC270_PCMCIA_CD); | ||
60 | 59 | ||
61 | if (!ret) | 60 | if (!ret) |
62 | ret = soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1); | 61 | ret = soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1); |
@@ -65,6 +64,7 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
65 | ARRAY_SIZE(vpac270_cf_gpios)); | 64 | ARRAY_SIZE(vpac270_cf_gpios)); |
66 | 65 | ||
67 | skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY); | 66 | skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY); |
67 | cd_irqs[1].irq = gpio_to_irq(GPIO17_VPAC270_CF_CD); | ||
68 | 68 | ||
69 | if (!ret) | 69 | if (!ret) |
70 | ret = soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1); | 70 | ret = soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1); |