16 #include <linux/resource.h>
17 #include <linux/slab.h>
26 #define MEM_MAP_SIZE 0x400000
27 #define IO_MAP_SIZE 0x1000
44 #define GPIO_CARDIRQ 4
45 #define GPIO_RESET 204
46 #define GPIO_OUTEN 205
49 #define GPIO_BATTDEAD 210
50 #define GPIO_BATTWARN 211
51 #define GPIO_POWER 214
65 #define to_xxs_socket(x) container_of(x, struct xxs1500_pcmcia_sock, socket)
76 static int xxs1500_pcmcia_configure(
struct pcmcia_socket *skt,
98 if (state->
flags & SS_RESET) {
113 static int xxs1500_pcmcia_get_status(
struct pcmcia_socket *skt,
154 static int xxs1500_pcmcia_sock_init(
struct pcmcia_socket *skt)
169 static int xxs1500_pcmcia_sock_suspend(
struct pcmcia_socket *skt)
174 static int au1x00_pcmcia_set_io_map(
struct pcmcia_socket *skt,
185 static int au1x00_pcmcia_set_mem_map(
struct pcmcia_socket *skt,
199 .init = xxs1500_pcmcia_sock_init,
200 .suspend = xxs1500_pcmcia_sock_suspend,
201 .get_status = xxs1500_pcmcia_get_status,
202 .set_socket = xxs1500_pcmcia_configure,
203 .set_io_map = au1x00_pcmcia_set_io_map,
204 .set_mem_map = au1x00_pcmcia_set_mem_map,
222 dev_err(&pdev->
dev,
"missing 'pcmcia-attr' resource!\n");
230 dev_err(&pdev->
dev,
"missing 'pcmcia-mem' resource!\n");
238 dev_err(&pdev->
dev,
"missing 'pcmcia-io' resource!\n");
256 dev_err(&pdev->
dev,
"cannot remap IO area\n");
261 sock->
socket.ops = &xxs1500_pcmcia_operations;
270 platform_set_drvdata(pdev, sock);
277 ret =
request_irq(irq, cdirq, 0,
"pcmcia_carddetect", sock);
316 .name =
"xxs1500_pcmcia",
319 .probe = xxs1500_pcmcia_probe,