Lines Matching +full:reset +full:- +full:n +full:- +full:io

1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/io.h>
26 #include <asm/mach-au1x00/au1000.h>
37 * 204: reset (high-act)
38 * 205: buffer enable (low-act)
42 * 214: power (low-act)
73 pcmcia_parse_events(&sock->socket, SS_DETECT); in cdirq()
85 switch (state->Vcc) { in xxs1500_pcmcia_configure()
94 return -EINVAL; in xxs1500_pcmcia_configure()
97 changed = state->flags ^ sock->old_flags; in xxs1500_pcmcia_configure()
100 if (state->flags & SS_RESET) { in xxs1500_pcmcia_configure()
101 gpio_set_value(GPIO_RESET, 1); /* assert reset */ in xxs1500_pcmcia_configure()
104 gpio_set_value(GPIO_RESET, 0); /* deassert reset */ in xxs1500_pcmcia_configure()
110 sock->old_flags = state->flags; in xxs1500_pcmcia_configure()
144 /* GPIO204: high-active reset line */ in xxs1500_pcmcia_get_status()
164 gpio_direction_output(GPIO_RESET, 1); /* assert reset */ in xxs1500_pcmcia_sock_init()
181 map->start = (u32)sock->virt_io; in au1x00_pcmcia_set_io_map()
182 map->stop = map->start + IO_MAP_SIZE; in au1x00_pcmcia_set_io_map()
192 if (map->flags & MAP_ATTRIB) in au1x00_pcmcia_set_mem_map()
193 map->static_start = sock->phys_attr + map->card_start; in au1x00_pcmcia_set_mem_map()
195 map->static_start = sock->phys_mem + map->card_start; in au1x00_pcmcia_set_mem_map()
217 return -ENOMEM; in xxs1500_pcmcia_probe()
219 ret = -ENODEV; in xxs1500_pcmcia_probe()
222 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-attr"); in xxs1500_pcmcia_probe()
224 dev_err(&pdev->dev, "missing 'pcmcia-attr' resource!\n"); in xxs1500_pcmcia_probe()
227 sock->phys_attr = r->start; in xxs1500_pcmcia_probe()
230 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-mem"); in xxs1500_pcmcia_probe()
232 dev_err(&pdev->dev, "missing 'pcmcia-mem' resource!\n"); in xxs1500_pcmcia_probe()
235 sock->phys_mem = r->start; in xxs1500_pcmcia_probe()
237 /* 36bit PCMCIA IO area address */ in xxs1500_pcmcia_probe()
238 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-io"); in xxs1500_pcmcia_probe()
240 dev_err(&pdev->dev, "missing 'pcmcia-io' resource!\n"); in xxs1500_pcmcia_probe()
243 sock->phys_io = r->start; in xxs1500_pcmcia_probe()
248 * the IO registers. Since mips_io_port_base is added in xxs1500_pcmcia_probe()
254 sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) - in xxs1500_pcmcia_probe()
257 if (!sock->virt_io) { in xxs1500_pcmcia_probe()
258 dev_err(&pdev->dev, "cannot remap IO area\n"); in xxs1500_pcmcia_probe()
259 ret = -ENOMEM; in xxs1500_pcmcia_probe()
263 sock->socket.ops = &xxs1500_pcmcia_operations; in xxs1500_pcmcia_probe()
264 sock->socket.owner = THIS_MODULE; in xxs1500_pcmcia_probe()
265 sock->socket.pci_irq = gpio_to_irq(GPIO_CARDIRQ); in xxs1500_pcmcia_probe()
266 sock->socket.features = SS_CAP_STATIC_MAP | SS_CAP_PCCARD; in xxs1500_pcmcia_probe()
267 sock->socket.map_size = MEM_MAP_SIZE; in xxs1500_pcmcia_probe()
268 sock->socket.io_offset = (unsigned long)sock->virt_io; in xxs1500_pcmcia_probe()
269 sock->socket.dev.parent = &pdev->dev; in xxs1500_pcmcia_probe()
270 sock->socket.resource_ops = &pccard_static_ops; in xxs1500_pcmcia_probe()
281 dev_err(&pdev->dev, "cannot setup cd irq\n"); in xxs1500_pcmcia_probe()
285 ret = pcmcia_register_socket(&sock->socket); in xxs1500_pcmcia_probe()
287 dev_err(&pdev->dev, "failed to register\n"); in xxs1500_pcmcia_probe()
291 printk(KERN_INFO "MyCable XXS1500 PCMCIA socket services\n"); in xxs1500_pcmcia_probe()
298 iounmap((void *)(sock->virt_io + (u32)mips_io_port_base)); in xxs1500_pcmcia_probe()
308 pcmcia_unregister_socket(&sock->socket); in xxs1500_pcmcia_remove()
310 iounmap((void *)(sock->virt_io + (u32)mips_io_port_base)); in xxs1500_pcmcia_remove()