diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2009-03-29 17:35:11 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-11-09 02:30:12 -0500 |
commit | dabd14684bc2375bf69f227f04993a4dc2fd3a16 (patch) | |
tree | 8315b3a85846538459bcfdb93b316ef086f2404c /drivers/pcmcia/sa1100_jornada720.c | |
parent | 701a5dc05ad99a06958b3f97cb69d99b47cebee3 (diff) |
PCMCIA: sa1111: remove duplicated initializers
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/sa1100_jornada720.c')
-rw-r--r-- | drivers/pcmcia/sa1100_jornada720.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c index 4a32f4f1a717..6bcabee6bde4 100644 --- a/drivers/pcmcia/sa1100_jornada720.c +++ b/drivers/pcmcia/sa1100_jornada720.c | |||
@@ -22,23 +22,6 @@ | |||
22 | #define SOCKET1_POWER (GPIO_GPIO1 | GPIO_GPIO3) | 22 | #define SOCKET1_POWER (GPIO_GPIO1 | GPIO_GPIO3) |
23 | #define SOCKET1_3V GPIO_GPIO3 | 23 | #define SOCKET1_3V GPIO_GPIO3 |
24 | 24 | ||
25 | static int jornada720_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | ||
26 | { | ||
27 | struct sa1111_pcmcia_socket *s = to_skt(skt); | ||
28 | unsigned int pin = GPIO_A0 | GPIO_A1 | GPIO_A2 | GPIO_A3; | ||
29 | |||
30 | /* | ||
31 | * What is all this crap for? | ||
32 | */ | ||
33 | GRER |= 0x00000002; | ||
34 | /* Set GPIO_A<3:1> to be outputs for PCMCIA/CF power controller: */ | ||
35 | sa1111_set_io_dir(s->dev, pin, 0, 0); | ||
36 | sa1111_set_io(s->dev, pin, 0); | ||
37 | sa1111_set_sleep_io(s->dev, pin, 0); | ||
38 | |||
39 | return sa1111_pcmcia_hw_init(skt); | ||
40 | } | ||
41 | |||
42 | static int | 25 | static int |
43 | jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) | 26 | jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) |
44 | { | 27 | { |
@@ -108,14 +91,8 @@ jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s | |||
108 | 91 | ||
109 | static struct pcmcia_low_level jornada720_pcmcia_ops = { | 92 | static struct pcmcia_low_level jornada720_pcmcia_ops = { |
110 | .owner = THIS_MODULE, | 93 | .owner = THIS_MODULE, |
111 | .hw_init = jornada720_pcmcia_hw_init, | ||
112 | .hw_shutdown = sa1111_pcmcia_hw_shutdown, | ||
113 | .socket_state = sa1111_pcmcia_socket_state, | ||
114 | .configure_socket = jornada720_pcmcia_configure_socket, | 94 | .configure_socket = jornada720_pcmcia_configure_socket, |
115 | |||
116 | .socket_init = sa1111_pcmcia_socket_init, | 95 | .socket_init = sa1111_pcmcia_socket_init, |
117 | .socket_suspend = sa1111_pcmcia_socket_suspend, | ||
118 | |||
119 | .first = 0, | 96 | .first = 0, |
120 | .nr = 2, | 97 | .nr = 2, |
121 | }; | 98 | }; |
@@ -125,6 +102,15 @@ int __devinit pcmcia_jornada720_init(struct device *dev) | |||
125 | int ret = -ENODEV; | 102 | int ret = -ENODEV; |
126 | 103 | ||
127 | if (machine_is_jornada720()) { | 104 | if (machine_is_jornada720()) { |
105 | unsigned int pin = GPIO_A0 | GPIO_A1 | GPIO_A2 | GPIO_A3; | ||
106 | |||
107 | GRER |= 0x00000002; | ||
108 | |||
109 | /* Set GPIO_A<3:1> to be outputs for PCMCIA/CF power controller: */ | ||
110 | sa1111_set_io_dir(dev, pin, 0, 0); | ||
111 | sa1111_set_io(dev, pin, 0); | ||
112 | sa1111_set_sleep_io(dev, pin, 0); | ||
113 | |||
128 | sa11xx_drv_pcmcia_ops(&jornada720_pcmcia_ops); | 114 | sa11xx_drv_pcmcia_ops(&jornada720_pcmcia_ops); |
129 | ret = sa1111_pcmcia_add(dev, &jornada720_pcmcia_ops, | 115 | ret = sa1111_pcmcia_add(dev, &jornada720_pcmcia_ops, |
130 | sa11xx_drv_pcmcia_add_one); | 116 | sa11xx_drv_pcmcia_add_one); |