Lines Matching +full:io +full:- +full:reset
2 * Linux ARCnet driver - COM90xx chipset (IO-mapped buffers)
5 * Written 1994-1999 by Avery Pennarun.
6 * Written 1999-2000 by Martin Mares <mj@ucw.cz>.
40 #include <linux/io.h>
64 * IO-mapped operation routines *
73 int ioaddr = dev->base_addr; in get_buffer_byte()
85 int ioaddr = dev->base_addr; in put_buffer_byte()
98 int ioaddr = dev->base_addr; in get_whole_buffer()
103 while (length--) in get_whole_buffer()
114 int ioaddr = dev->base_addr; in put_whole_buffer()
119 while (length--) in put_whole_buffer()
127 /* We cannot probe for an IO mapped card either, although we can check that
132 int ioaddr = dev->base_addr, status; in com90io_probe()
136 pr_info("%s\n", "COM90xx IO-mapped mode support (by David Woodhouse et el.)"); in com90io_probe()
137 pr_info("E-mail me if you actually test this driver, please!\n"); in com90io_probe()
141 …arc_printk(D_NORMAL, dev, "No autoprobe for IO mapped cards; you must specify the base address!\n"… in com90io_probe()
142 return -ENODEV; in com90io_probe()
145 arc_printk(D_INIT_REASONS, dev, "IO request_region %x-%x failed\n", in com90io_probe()
146 ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1); in com90io_probe()
147 return -ENXIO; in com90io_probe()
150 arc_printk(D_INIT_REASONS, dev, "IO address %x empty\n", in com90io_probe()
164 arc_printk(D_INIT_REASONS, dev, "Status after reset: %X\n", status); in com90io_probe()
169 arc_printk(D_INIT_REASONS, dev, "Status after reset acknowledged: %X\n", in com90io_probe()
175 arc_printk(D_INIT_REASONS, dev, "Eternal reset (status=%Xh)\n", in com90io_probe()
193 if (!dev->irq) { in com90io_probe()
195 * card has just reset and the NORXflag is on until in com90io_probe()
203 dev->irq = probe_irq_off(airqmask); in com90io_probe()
205 if ((int)dev->irq <= 0) { in com90io_probe()
215 return -ENODEV; in com90io_probe()
224 int ioaddr = dev->base_addr; in com90io_found()
228 if (request_irq(dev->irq, arcnet_interrupt, 0, in com90io_found()
229 "arcnet (COM90xx-IO)", dev)) { in com90io_found()
230 arc_printk(D_NORMAL, dev, "Can't get IRQ %d!\n", dev->irq); in com90io_found()
231 return -ENODEV; in com90io_found()
234 if (!request_region(dev->base_addr, ARCNET_TOTAL_SIZE, in com90io_found()
235 "arcnet (COM90xx-IO)")) { in com90io_found()
236 free_irq(dev->irq, dev); in com90io_found()
237 return -EBUSY; in com90io_found()
241 lp->card_name = "COM90xx I/O"; in com90io_found()
242 lp->hw.command = com90io_command; in com90io_found()
243 lp->hw.status = com90io_status; in com90io_found()
244 lp->hw.intmask = com90io_setmask; in com90io_found()
245 lp->hw.reset = com90io_reset; in com90io_found()
246 lp->hw.owner = THIS_MODULE; in com90io_found()
247 lp->hw.copy_to_card = com90io_copy_to_card; in com90io_found()
248 lp->hw.copy_from_card = com90io_copy_from_card; in com90io_found()
250 lp->config = (0x16 | IOMAPflag) & ~ENABLE16flag; in com90io_found()
251 arcnet_outb(lp->config, ioaddr, COM9026_REG_RW_CONFIG); in com90io_found()
261 free_irq(dev->irq, dev); in com90io_found()
262 release_region(dev->base_addr, ARCNET_TOTAL_SIZE); in com90io_found()
267 dev->dev_addr[0], dev->base_addr, dev->irq); in com90io_found()
272 /* Do a hardware reset on the card, and set up necessary registers.
282 short ioaddr = dev->base_addr; in com90io_reset()
285 dev->name, arcnet_inb(ioaddr, COM9026_REG_R_STATUS)); in com90io_reset()
288 /* reset the card */ in com90io_reset()
292 /* Set the thing to IO-mapped, 8-bit mode */ in com90io_reset()
293 lp->config = (0x1C | IOMAPflag) & ~ENABLE16flag; in com90io_reset()
294 arcnet_outb(lp->config, ioaddr, COM9026_REG_RW_CONFIG); in com90io_reset()
297 /* clear flags & end reset */ in com90io_reset()
302 arc_printk(D_NORMAL, dev, "reset failed: TESTvalue not present.\n"); in com90io_reset()
305 /* enable extended (512-byte) packets */ in com90io_reset()
313 short ioaddr = dev->base_addr; in com90io_command()
320 short ioaddr = dev->base_addr; in com90io_status()
327 short ioaddr = dev->base_addr; in com90io_setmask()
346 static int io; /* use the insmod io= irq= shmem= options */ variable
350 module_param_hw(io, int, ioport, 0);
353 MODULE_DESCRIPTION("ARCnet COM90xx IO mapped chipset driver");
371 case 1: /* IO address */ in com90io_setup()
372 io = ints[1]; in com90io_setup()
390 return -ENOMEM; in com90io_init()
392 dev->base_addr = io; in com90io_init()
393 dev->irq = irq; in com90io_init()
394 if (dev->irq == 2) in com90io_init()
395 dev->irq = 9; in com90io_init()
411 int ioaddr = dev->base_addr; in com90io_exit()
421 free_irq(dev->irq, dev); in com90io_exit()
422 release_region(dev->base_addr, ARCNET_TOTAL_SIZE); in com90io_exit()