diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2009-03-29 14:42:44 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-11-09 02:30:11 -0500 |
commit | 701a5dc05ad99a06958b3f97cb69d99b47cebee3 (patch) | |
tree | f91ab0cb2179fa771dfb3c9929bc09c7580ec3f8 /drivers/pcmcia/pxa2xx_lubbock.c | |
parent | da4f007375197d6683461b995d404b01a7fdf2f5 (diff) |
PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pxa2xx_lubbock.c')
-rw-r--r-- | drivers/pcmcia/pxa2xx_lubbock.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c index 6cbb1b1f7cfd..35d52809a8cd 100644 --- a/drivers/pcmcia/pxa2xx_lubbock.c +++ b/drivers/pcmcia/pxa2xx_lubbock.c | |||
@@ -32,6 +32,7 @@ static int | |||
32 | lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | 32 | lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, |
33 | const socket_state_t *state) | 33 | const socket_state_t *state) |
34 | { | 34 | { |
35 | struct sa1111_pcmcia_socket *s = to_skt(skt); | ||
35 | unsigned int pa_dwr_mask, pa_dwr_set, misc_mask, misc_set; | 36 | unsigned int pa_dwr_mask, pa_dwr_set, misc_mask, misc_set; |
36 | int ret = 0; | 37 | int ret = 0; |
37 | 38 | ||
@@ -149,7 +150,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
149 | 150 | ||
150 | if (ret == 0) { | 151 | if (ret == 0) { |
151 | lubbock_set_misc_wr(misc_mask, misc_set); | 152 | lubbock_set_misc_wr(misc_mask, misc_set); |
152 | sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, pa_dwr_set); | 153 | sa1111_set_io(s->dev, pa_dwr_mask, pa_dwr_set); |
153 | } | 154 | } |
154 | 155 | ||
155 | #if 1 | 156 | #if 1 |
@@ -175,7 +176,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
175 | * Switch to 5V, Configure socket with 5V voltage | 176 | * Switch to 5V, Configure socket with 5V voltage |
176 | */ | 177 | */ |
177 | lubbock_set_misc_wr(misc_mask, 0); | 178 | lubbock_set_misc_wr(misc_mask, 0); |
178 | sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, 0); | 179 | sa1111_set_io(s->dev, pa_dwr_mask, 0); |
179 | 180 | ||
180 | /* | 181 | /* |
181 | * It takes about 100ms to turn off Vcc. | 182 | * It takes about 100ms to turn off Vcc. |
@@ -228,8 +229,9 @@ int pcmcia_lubbock_init(struct sa1111_dev *sadev) | |||
228 | /* Set CF Socket 1 power to standby mode. */ | 229 | /* Set CF Socket 1 power to standby mode. */ |
229 | lubbock_set_misc_wr((1 << 15) | (1 << 14), 0); | 230 | lubbock_set_misc_wr((1 << 15) | (1 << 14), 0); |
230 | 231 | ||
231 | sadev->dev.platform_data = &lubbock_pcmcia_ops; | 232 | pxa2xx_drv_pcmcia_ops(&lubbock_pcmcia_ops); |
232 | ret = __pxa2xx_drv_pcmcia_probe(&sadev->dev); | 233 | ret = sa1111_pcmcia_add(sadev, &lubbock_pcmcia_ops, |
234 | pxa2xx_drv_pcmcia_add_one); | ||
233 | } | 235 | } |
234 | 236 | ||
235 | return ret; | 237 | return ret; |