Lines Matching refs:sock
71 struct xxs1500_pcmcia_sock *sock = data;
73 pcmcia_parse_events(&sock->socket, SS_DETECT);
81 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt);
97 changed = state->flags ^ sock->old_flags;
110 sock->old_flags = state->flags;
179 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt);
181 map->start = (u32)sock->virt_io;
190 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt);
193 map->static_start = sock->phys_attr + map->card_start;
195 map->static_start = sock->phys_mem + map->card_start;
211 struct xxs1500_pcmcia_sock *sock;
215 sock = kzalloc(sizeof(struct xxs1500_pcmcia_sock), GFP_KERNEL);
216 if (!sock)
227 sock->phys_attr = r->start;
235 sock->phys_mem = r->start;
243 sock->phys_io = r->start;
254 sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) -
257 if (!sock->virt_io) {
263 sock->socket.ops = &xxs1500_pcmcia_operations;
264 sock->socket.owner = THIS_MODULE;
265 sock->socket.pci_irq = gpio_to_irq(GPIO_CARDIRQ);
266 sock->socket.features = SS_CAP_STATIC_MAP | SS_CAP_PCCARD;
267 sock->socket.map_size = MEM_MAP_SIZE;
268 sock->socket.io_offset = (unsigned long)sock->virt_io;
269 sock->socket.dev.parent = &pdev->dev;
270 sock->socket.resource_ops = &pccard_static_ops;
272 platform_set_drvdata(pdev, sock);
279 ret = request_irq(irq, cdirq, 0, "pcmcia_carddetect", sock);
285 ret = pcmcia_register_socket(&sock->socket);
296 free_irq(gpio_to_irq(GPIO_CDA), sock);
298 iounmap((void *)(sock->virt_io + (u32)mips_io_port_base));
300 kfree(sock);
306 struct xxs1500_pcmcia_sock *sock = platform_get_drvdata(pdev);
308 pcmcia_unregister_socket(&sock->socket);
309 free_irq(gpio_to_irq(GPIO_CDA), sock);
310 iounmap((void *)(sock->virt_io + (u32)mips_io_port_base));
311 kfree(sock);