Lines Matching refs:sock
70 struct xxs1500_pcmcia_sock *sock = data; in cdirq() local
72 pcmcia_parse_events(&sock->socket, SS_DETECT); in cdirq()
80 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in xxs1500_pcmcia_configure() local
96 changed = state->flags ^ sock->old_flags; in xxs1500_pcmcia_configure()
109 sock->old_flags = state->flags; in xxs1500_pcmcia_configure()
178 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in au1x00_pcmcia_set_io_map() local
180 map->start = (u32)sock->virt_io; in au1x00_pcmcia_set_io_map()
189 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in au1x00_pcmcia_set_mem_map() local
192 map->static_start = sock->phys_attr + map->card_start; in au1x00_pcmcia_set_mem_map()
194 map->static_start = sock->phys_mem + map->card_start; in au1x00_pcmcia_set_mem_map()
210 struct xxs1500_pcmcia_sock *sock; in xxs1500_pcmcia_probe() local
214 sock = kzalloc(sizeof(struct xxs1500_pcmcia_sock), GFP_KERNEL); in xxs1500_pcmcia_probe()
215 if (!sock) in xxs1500_pcmcia_probe()
226 sock->phys_attr = r->start; in xxs1500_pcmcia_probe()
234 sock->phys_mem = r->start; in xxs1500_pcmcia_probe()
242 sock->phys_io = r->start; in xxs1500_pcmcia_probe()
253 sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) - in xxs1500_pcmcia_probe()
256 if (!sock->virt_io) { in xxs1500_pcmcia_probe()
262 sock->socket.ops = &xxs1500_pcmcia_operations; in xxs1500_pcmcia_probe()
263 sock->socket.owner = THIS_MODULE; in xxs1500_pcmcia_probe()
264 sock->socket.pci_irq = gpio_to_irq(GPIO_CARDIRQ); in xxs1500_pcmcia_probe()
265 sock->socket.features = SS_CAP_STATIC_MAP | SS_CAP_PCCARD; in xxs1500_pcmcia_probe()
266 sock->socket.map_size = MEM_MAP_SIZE; in xxs1500_pcmcia_probe()
267 sock->socket.io_offset = (unsigned long)sock->virt_io; in xxs1500_pcmcia_probe()
268 sock->socket.dev.parent = &pdev->dev; in xxs1500_pcmcia_probe()
269 sock->socket.resource_ops = &pccard_static_ops; in xxs1500_pcmcia_probe()
271 platform_set_drvdata(pdev, sock); in xxs1500_pcmcia_probe()
278 ret = request_irq(irq, cdirq, 0, "pcmcia_carddetect", sock); in xxs1500_pcmcia_probe()
284 ret = pcmcia_register_socket(&sock->socket); in xxs1500_pcmcia_probe()
295 free_irq(gpio_to_irq(GPIO_CDA), sock); in xxs1500_pcmcia_probe()
297 iounmap((void *)(sock->virt_io + (u32)mips_io_port_base)); in xxs1500_pcmcia_probe()
299 kfree(sock); in xxs1500_pcmcia_probe()
305 struct xxs1500_pcmcia_sock *sock = platform_get_drvdata(pdev); in xxs1500_pcmcia_remove() local
307 pcmcia_unregister_socket(&sock->socket); in xxs1500_pcmcia_remove()
308 free_irq(gpio_to_irq(GPIO_CDA), sock); in xxs1500_pcmcia_remove()
309 iounmap((void *)(sock->virt_io + (u32)mips_io_port_base)); in xxs1500_pcmcia_remove()
310 kfree(sock); in xxs1500_pcmcia_remove()