f0f06a2740453c7e6f9bf59618852ad1819fe853
[deliverable/linux.git] / drivers / net / arcnet / com90xx.c
1 /*
2 * Linux ARCnet driver - COM90xx chipset (memory-mapped buffers)
3 *
4 * Written 1994-1999 by Avery Pennarun.
5 * Written 1999 by Martin Mares <mj@ucw.cz>.
6 * Derived from skeleton.c by Donald Becker.
7 *
8 * Special thanks to Contemporary Controls, Inc. (www.ccontrols.com)
9 * for sponsoring the further development of this driver.
10 *
11 * **********************
12 *
13 * The original copyright of skeleton.c was as follows:
14 *
15 * skeleton.c Written 1993 by Donald Becker.
16 * Copyright 1993 United States Government as represented by the
17 * Director, National Security Agency. This software may only be used
18 * and distributed according to the terms of the GNU General Public License as
19 * modified by SRC, incorporated herein by reference.
20 *
21 * **********************
22 *
23 * For more details, see drivers/net/arcnet.c
24 *
25 * **********************
26 */
27 #include <linux/module.h>
28 #include <linux/moduleparam.h>
29 #include <linux/init.h>
30 #include <linux/interrupt.h>
31 #include <linux/ioport.h>
32 #include <linux/delay.h>
33 #include <linux/netdevice.h>
34 #include <linux/slab.h>
35 #include <asm/io.h>
36 #include <linux/arcdevice.h>
37
38 #define VERSION "arcnet: COM90xx chipset support\n"
39
40 /* Define this to speed up the autoprobe by assuming if only one io port and
41 * shmem are left in the list at Stage 5, they must correspond to each
42 * other.
43 *
44 * This is undefined by default because it might not always be true, and the
45 * extra check makes the autoprobe even more careful. Speed demons can turn
46 * it on - I think it should be fine if you only have one ARCnet card
47 * installed.
48 *
49 * If no ARCnet cards are installed, this delay never happens anyway and thus
50 * the option has no effect.
51 */
52 #undef FAST_PROBE
53
54 /* Internal function declarations */
55 static int com90xx_found(int ioaddr, int airq, u_long shmem, void __iomem *);
56 static void com90xx_command(struct net_device *dev, int command);
57 static int com90xx_status(struct net_device *dev);
58 static void com90xx_setmask(struct net_device *dev, int mask);
59 static int com90xx_reset(struct net_device *dev, int really_reset);
60 static void com90xx_copy_to_card(struct net_device *dev, int bufnum, int offset,
61 void *buf, int count);
62 static void com90xx_copy_from_card(struct net_device *dev, int bufnum, int offset,
63 void *buf, int count);
64
65 /* Known ARCnet cards */
66
67 static struct net_device *cards[16];
68 static int numcards;
69
70 /* Handy defines for ARCnet specific stuff */
71
72 /* The number of low I/O ports used by the card */
73 #define ARCNET_TOTAL_SIZE 16
74
75 /* Amount of I/O memory used by the card */
76 #define BUFFER_SIZE (512)
77 #define MIRROR_SIZE (BUFFER_SIZE * 4)
78
79 /* COM 9026 controller chip --> ARCnet register addresses */
80 #define _INTMASK (ioaddr + 0) /* writable */
81 #define _STATUS (ioaddr + 0) /* readable */
82 #define _COMMAND (ioaddr + 1) /* writable, returns random vals on read (?) */
83 #define _CONFIG (ioaddr + 2) /* Configuration register */
84 #define _RESET (ioaddr + 8) /* software reset (on read) */
85 #define _MEMDATA (ioaddr + 12) /* Data port for IO-mapped memory */
86 #define _ADDR_HI (ioaddr + 15) /* Control registers for said */
87 #define _ADDR_LO (ioaddr + 14)
88
89 #undef ASTATUS
90 #undef ACOMMAND
91 #undef AINTMASK
92
93 #define ASTATUS() inb(_STATUS)
94 #define ACOMMAND(cmd) outb((cmd), _COMMAND)
95 #define AINTMASK(msk) outb((msk), _INTMASK)
96
97 static int com90xx_skip_probe __initdata = 0;
98
99 /* Module parameters */
100
101 static int io; /* use the insmod io= irq= shmem= options */
102 static int irq;
103 static int shmem;
104 static char device[9]; /* use eg. device=arc1 to change name */
105
106 module_param(io, int, 0);
107 module_param(irq, int, 0);
108 module_param(shmem, int, 0);
109 module_param_string(device, device, sizeof(device), 0);
110
111 static void __init com90xx_probe(void)
112 {
113 int count, status, ioaddr, numprint, airq, openparen = 0;
114 unsigned long airqmask;
115 int ports[(0x3f0 - 0x200) / 16 + 1] =
116 {0};
117 unsigned long *shmems;
118 void __iomem **iomem;
119 int numports, numshmems, *port;
120 u_long *p;
121 int index;
122
123 if (!io && !irq && !shmem && !*device && com90xx_skip_probe)
124 return;
125
126 shmems = kzalloc(((0x100000 - 0xa0000) / 0x800) * sizeof(unsigned long),
127 GFP_KERNEL);
128 if (!shmems)
129 return;
130 iomem = kzalloc(((0x100000 - 0xa0000) / 0x800) * sizeof(void __iomem *),
131 GFP_KERNEL);
132 if (!iomem) {
133 kfree(shmems);
134 return;
135 }
136
137 BUGLVL(D_NORMAL) printk(VERSION);
138
139 /* set up the arrays where we'll store the possible probe addresses */
140 numports = numshmems = 0;
141 if (io)
142 ports[numports++] = io;
143 else
144 for (count = 0x200; count <= 0x3f0; count += 16)
145 ports[numports++] = count;
146 if (shmem)
147 shmems[numshmems++] = shmem;
148 else
149 for (count = 0xA0000; count <= 0xFF800; count += 2048)
150 shmems[numshmems++] = count;
151
152 /* Stage 1: abandon any reserved ports, or ones with status==0xFF
153 * (empty), and reset any others by reading the reset port.
154 */
155 numprint = -1;
156 for (port = &ports[0]; port - ports < numports; port++) {
157 numprint++;
158 numprint %= 8;
159 if (!numprint) {
160 BUGMSG2(D_INIT, "\n");
161 BUGMSG2(D_INIT, "S1: ");
162 }
163 BUGMSG2(D_INIT, "%Xh ", *port);
164
165 ioaddr = *port;
166
167 if (!request_region(*port, ARCNET_TOTAL_SIZE, "arcnet (90xx)")) {
168 BUGMSG2(D_INIT_REASONS, "(request_region)\n");
169 BUGMSG2(D_INIT_REASONS, "S1: ");
170 BUGLVL(D_INIT_REASONS) numprint = 0;
171 *port-- = ports[--numports];
172 continue;
173 }
174 if (ASTATUS() == 0xFF) {
175 BUGMSG2(D_INIT_REASONS, "(empty)\n");
176 BUGMSG2(D_INIT_REASONS, "S1: ");
177 BUGLVL(D_INIT_REASONS) numprint = 0;
178 release_region(*port, ARCNET_TOTAL_SIZE);
179 *port-- = ports[--numports];
180 continue;
181 }
182 inb(_RESET); /* begin resetting card */
183
184 BUGMSG2(D_INIT_REASONS, "\n");
185 BUGMSG2(D_INIT_REASONS, "S1: ");
186 BUGLVL(D_INIT_REASONS) numprint = 0;
187 }
188 BUGMSG2(D_INIT, "\n");
189
190 if (!numports) {
191 BUGMSG2(D_NORMAL, "S1: No ARCnet cards found.\n");
192 kfree(shmems);
193 kfree(iomem);
194 return;
195 }
196 /* Stage 2: we have now reset any possible ARCnet cards, so we can't
197 * do anything until they finish. If D_INIT, print the list of
198 * cards that are left.
199 */
200 numprint = -1;
201 for (port = &ports[0]; port < ports + numports; port++) {
202 numprint++;
203 numprint %= 8;
204 if (!numprint) {
205 BUGMSG2(D_INIT, "\n");
206 BUGMSG2(D_INIT, "S2: ");
207 }
208 BUGMSG2(D_INIT, "%Xh ", *port);
209 }
210 BUGMSG2(D_INIT, "\n");
211 mdelay(RESETtime);
212
213 /* Stage 3: abandon any shmem addresses that don't have the signature
214 * 0xD1 byte in the right place, or are read-only.
215 */
216 numprint = -1;
217 for (index = 0, p = &shmems[0]; index < numshmems; p++, index++) {
218 void __iomem *base;
219
220 numprint++;
221 numprint %= 8;
222 if (!numprint) {
223 BUGMSG2(D_INIT, "\n");
224 BUGMSG2(D_INIT, "S3: ");
225 }
226 BUGMSG2(D_INIT, "%lXh ", *p);
227
228 if (!request_mem_region(*p, MIRROR_SIZE, "arcnet (90xx)")) {
229 BUGMSG2(D_INIT_REASONS, "(request_mem_region)\n");
230 BUGMSG2(D_INIT_REASONS, "Stage 3: ");
231 BUGLVL(D_INIT_REASONS) numprint = 0;
232 goto out;
233 }
234 base = ioremap(*p, MIRROR_SIZE);
235 if (!base) {
236 BUGMSG2(D_INIT_REASONS, "(ioremap)\n");
237 BUGMSG2(D_INIT_REASONS, "Stage 3: ");
238 BUGLVL(D_INIT_REASONS) numprint = 0;
239 goto out1;
240 }
241 if (readb(base) != TESTvalue) {
242 BUGMSG2(D_INIT_REASONS, "(%02Xh != %02Xh)\n",
243 readb(base), TESTvalue);
244 BUGMSG2(D_INIT_REASONS, "S3: ");
245 BUGLVL(D_INIT_REASONS) numprint = 0;
246 goto out2;
247 }
248 /* By writing 0x42 to the TESTvalue location, we also make
249 * sure no "mirror" shmem areas show up - if they occur
250 * in another pass through this loop, they will be discarded
251 * because *cptr != TESTvalue.
252 */
253 writeb(0x42, base);
254 if (readb(base) != 0x42) {
255 BUGMSG2(D_INIT_REASONS, "(read only)\n");
256 BUGMSG2(D_INIT_REASONS, "S3: ");
257 goto out2;
258 }
259 BUGMSG2(D_INIT_REASONS, "\n");
260 BUGMSG2(D_INIT_REASONS, "S3: ");
261 BUGLVL(D_INIT_REASONS) numprint = 0;
262 iomem[index] = base;
263 continue;
264 out2:
265 iounmap(base);
266 out1:
267 release_mem_region(*p, MIRROR_SIZE);
268 out:
269 *p-- = shmems[--numshmems];
270 index--;
271 }
272 BUGMSG2(D_INIT, "\n");
273
274 if (!numshmems) {
275 BUGMSG2(D_NORMAL, "S3: No ARCnet cards found.\n");
276 for (port = &ports[0]; port < ports + numports; port++)
277 release_region(*port, ARCNET_TOTAL_SIZE);
278 kfree(shmems);
279 kfree(iomem);
280 return;
281 }
282 /* Stage 4: something of a dummy, to report the shmems that are
283 * still possible after stage 3.
284 */
285 numprint = -1;
286 for (p = &shmems[0]; p < shmems + numshmems; p++) {
287 numprint++;
288 numprint %= 8;
289 if (!numprint) {
290 BUGMSG2(D_INIT, "\n");
291 BUGMSG2(D_INIT, "S4: ");
292 }
293 BUGMSG2(D_INIT, "%lXh ", *p);
294 }
295 BUGMSG2(D_INIT, "\n");
296
297 /* Stage 5: for any ports that have the correct status, can disable
298 * the RESET flag, and (if no irq is given) generate an autoirq,
299 * register an ARCnet device.
300 *
301 * Currently, we can only register one device per probe, so quit
302 * after the first one is found.
303 */
304 numprint = -1;
305 for (port = &ports[0]; port < ports + numports; port++) {
306 int found = 0;
307
308 numprint++;
309 numprint %= 8;
310 if (!numprint) {
311 BUGMSG2(D_INIT, "\n");
312 BUGMSG2(D_INIT, "S5: ");
313 }
314 BUGMSG2(D_INIT, "%Xh ", *port);
315
316 ioaddr = *port;
317 status = ASTATUS();
318
319 if ((status & 0x9D)
320 != (NORXflag | RECONflag | TXFREEflag | RESETflag)) {
321 BUGMSG2(D_INIT_REASONS, "(status=%Xh)\n", status);
322 BUGMSG2(D_INIT_REASONS, "S5: ");
323 BUGLVL(D_INIT_REASONS) numprint = 0;
324 release_region(*port, ARCNET_TOTAL_SIZE);
325 *port-- = ports[--numports];
326 continue;
327 }
328 ACOMMAND(CFLAGScmd | RESETclear | CONFIGclear);
329 status = ASTATUS();
330 if (status & RESETflag) {
331 BUGMSG2(D_INIT_REASONS, " (eternal reset, status=%Xh)\n",
332 status);
333 BUGMSG2(D_INIT_REASONS, "S5: ");
334 BUGLVL(D_INIT_REASONS) numprint = 0;
335 release_region(*port, ARCNET_TOTAL_SIZE);
336 *port-- = ports[--numports];
337 continue;
338 }
339 /* skip this completely if an IRQ was given, because maybe
340 * we're on a machine that locks during autoirq!
341 */
342 if (!irq) {
343 /* if we do this, we're sure to get an IRQ since the
344 * card has just reset and the NORXflag is on until
345 * we tell it to start receiving.
346 */
347 airqmask = probe_irq_on();
348 AINTMASK(NORXflag);
349 udelay(1);
350 AINTMASK(0);
351 airq = probe_irq_off(airqmask);
352
353 if (airq <= 0) {
354 BUGMSG2(D_INIT_REASONS, "(airq=%d)\n", airq);
355 BUGMSG2(D_INIT_REASONS, "S5: ");
356 BUGLVL(D_INIT_REASONS) numprint = 0;
357 release_region(*port, ARCNET_TOTAL_SIZE);
358 *port-- = ports[--numports];
359 continue;
360 }
361 } else {
362 airq = irq;
363 }
364
365 BUGMSG2(D_INIT, "(%d,", airq);
366 openparen = 1;
367
368 /* Everything seems okay. But which shmem, if any, puts
369 * back its signature byte when the card is reset?
370 *
371 * If there are multiple cards installed, there might be
372 * multiple shmems still in the list.
373 */
374 #ifdef FAST_PROBE
375 if (numports > 1 || numshmems > 1) {
376 inb(_RESET);
377 mdelay(RESETtime);
378 } else {
379 /* just one shmem and port, assume they match */
380 writeb(TESTvalue, iomem[0]);
381 }
382 #else
383 inb(_RESET);
384 mdelay(RESETtime);
385 #endif
386
387 for (index = 0; index < numshmems; index++) {
388 u_long ptr = shmems[index];
389 void __iomem *base = iomem[index];
390
391 if (readb(base) == TESTvalue) { /* found one */
392 BUGMSG2(D_INIT, "%lXh)\n", *p);
393 openparen = 0;
394
395 /* register the card */
396 if (com90xx_found(*port, airq, ptr, base) == 0)
397 found = 1;
398 numprint = -1;
399
400 /* remove shmem from the list */
401 shmems[index] = shmems[--numshmems];
402 iomem[index] = iomem[numshmems];
403 break; /* go to the next I/O port */
404 } else {
405 BUGMSG2(D_INIT_REASONS, "%Xh-", readb(base));
406 }
407 }
408
409 if (openparen) {
410 BUGLVL(D_INIT) printk("no matching shmem)\n");
411 BUGLVL(D_INIT_REASONS) printk("S5: ");
412 BUGLVL(D_INIT_REASONS) numprint = 0;
413 }
414 if (!found)
415 release_region(*port, ARCNET_TOTAL_SIZE);
416 *port-- = ports[--numports];
417 }
418
419 BUGLVL(D_INIT_REASONS) printk("\n");
420
421 /* Now put back TESTvalue on all leftover shmems. */
422 for (index = 0; index < numshmems; index++) {
423 writeb(TESTvalue, iomem[index]);
424 iounmap(iomem[index]);
425 release_mem_region(shmems[index], MIRROR_SIZE);
426 }
427 kfree(shmems);
428 kfree(iomem);
429 }
430
431 static int check_mirror(unsigned long addr, size_t size)
432 {
433 void __iomem *p;
434 int res = -1;
435
436 if (!request_mem_region(addr, size, "arcnet (90xx)"))
437 return -1;
438
439 p = ioremap(addr, size);
440 if (p) {
441 if (readb(p) == TESTvalue)
442 res = 1;
443 else
444 res = 0;
445 iounmap(p);
446 }
447
448 release_mem_region(addr, size);
449 return res;
450 }
451
452 /* Set up the struct net_device associated with this card. Called after
453 * probing succeeds.
454 */
455 static int __init com90xx_found(int ioaddr, int airq, u_long shmem, void __iomem *p)
456 {
457 struct net_device *dev = NULL;
458 struct arcnet_local *lp;
459 u_long first_mirror, last_mirror;
460 int mirror_size;
461
462 /* allocate struct net_device */
463 dev = alloc_arcdev(device);
464 if (!dev) {
465 BUGMSG2(D_NORMAL, "com90xx: Can't allocate device!\n");
466 iounmap(p);
467 release_mem_region(shmem, MIRROR_SIZE);
468 return -ENOMEM;
469 }
470 lp = netdev_priv(dev);
471 /* find the real shared memory start/end points, including mirrors */
472
473 /* guess the actual size of one "memory mirror" - the number of
474 * bytes between copies of the shared memory. On most cards, it's
475 * 2k (or there are no mirrors at all) but on some, it's 4k.
476 */
477 mirror_size = MIRROR_SIZE;
478 if (readb(p) == TESTvalue &&
479 check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0 &&
480 check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1)
481 mirror_size = 2 * MIRROR_SIZE;
482
483 first_mirror = shmem - mirror_size;
484 while (check_mirror(first_mirror, mirror_size) == 1)
485 first_mirror -= mirror_size;
486 first_mirror += mirror_size;
487
488 last_mirror = shmem + mirror_size;
489 while (check_mirror(last_mirror, mirror_size) == 1)
490 last_mirror += mirror_size;
491 last_mirror -= mirror_size;
492
493 dev->mem_start = first_mirror;
494 dev->mem_end = last_mirror + MIRROR_SIZE - 1;
495
496 iounmap(p);
497 release_mem_region(shmem, MIRROR_SIZE);
498
499 if (!request_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1, "arcnet (90xx)"))
500 goto err_free_dev;
501
502 /* reserve the irq */
503 if (request_irq(airq, arcnet_interrupt, 0, "arcnet (90xx)", dev)) {
504 BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", airq);
505 goto err_release_mem;
506 }
507 dev->irq = airq;
508
509 /* Initialize the rest of the device structure. */
510 lp->card_name = "COM90xx";
511 lp->hw.command = com90xx_command;
512 lp->hw.status = com90xx_status;
513 lp->hw.intmask = com90xx_setmask;
514 lp->hw.reset = com90xx_reset;
515 lp->hw.owner = THIS_MODULE;
516 lp->hw.copy_to_card = com90xx_copy_to_card;
517 lp->hw.copy_from_card = com90xx_copy_from_card;
518 lp->mem_start = ioremap(dev->mem_start, dev->mem_end - dev->mem_start + 1);
519 if (!lp->mem_start) {
520 BUGMSG(D_NORMAL, "Can't remap device memory!\n");
521 goto err_free_irq;
522 }
523
524 /* get and check the station ID from offset 1 in shmem */
525 dev->dev_addr[0] = readb(lp->mem_start + 1);
526
527 dev->base_addr = ioaddr;
528
529 BUGMSG(D_NORMAL, "COM90xx station %02Xh found at %03lXh, IRQ %d, "
530 "ShMem %lXh (%ld*%xh).\n",
531 dev->dev_addr[0],
532 dev->base_addr, dev->irq, dev->mem_start,
533 (dev->mem_end - dev->mem_start + 1) / mirror_size, mirror_size);
534
535 if (register_netdev(dev))
536 goto err_unmap;
537
538 cards[numcards++] = dev;
539 return 0;
540
541 err_unmap:
542 iounmap(lp->mem_start);
543 err_free_irq:
544 free_irq(dev->irq, dev);
545 err_release_mem:
546 release_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1);
547 err_free_dev:
548 free_netdev(dev);
549 return -EIO;
550 }
551
552 static void com90xx_command(struct net_device *dev, int cmd)
553 {
554 short ioaddr = dev->base_addr;
555
556 ACOMMAND(cmd);
557 }
558
559 static int com90xx_status(struct net_device *dev)
560 {
561 short ioaddr = dev->base_addr;
562
563 return ASTATUS();
564 }
565
566 static void com90xx_setmask(struct net_device *dev, int mask)
567 {
568 short ioaddr = dev->base_addr;
569
570 AINTMASK(mask);
571 }
572
573 /*
574 * Do a hardware reset on the card, and set up necessary registers.
575 *
576 * This should be called as little as possible, because it disrupts the
577 * token on the network (causes a RECON) and requires a significant delay.
578 *
579 * However, it does make sure the card is in a defined state.
580 */
581 static int com90xx_reset(struct net_device *dev, int really_reset)
582 {
583 struct arcnet_local *lp = netdev_priv(dev);
584 short ioaddr = dev->base_addr;
585
586 BUGMSG(D_INIT, "Resetting (status=%02Xh)\n", ASTATUS());
587
588 if (really_reset) {
589 /* reset the card */
590 inb(_RESET);
591 mdelay(RESETtime);
592 }
593 ACOMMAND(CFLAGScmd | RESETclear); /* clear flags & end reset */
594 ACOMMAND(CFLAGScmd | CONFIGclear);
595
596 /* don't do this until we verify that it doesn't hurt older cards! */
597 /* outb(inb(_CONFIG) | ENABLE16flag, _CONFIG); */
598
599 /* verify that the ARCnet signature byte is present */
600 if (readb(lp->mem_start) != TESTvalue) {
601 if (really_reset)
602 BUGMSG(D_NORMAL, "reset failed: TESTvalue not present.\n");
603 return 1;
604 }
605 /* enable extended (512-byte) packets */
606 ACOMMAND(CONFIGcmd | EXTconf);
607
608 /* clean out all the memory to make debugging make more sense :) */
609 BUGLVL(D_DURING)
610 memset_io(lp->mem_start, 0x42, 2048);
611
612 /* done! return success. */
613 return 0;
614 }
615
616 static void com90xx_copy_to_card(struct net_device *dev, int bufnum, int offset,
617 void *buf, int count)
618 {
619 struct arcnet_local *lp = netdev_priv(dev);
620 void __iomem *memaddr = lp->mem_start + bufnum * 512 + offset;
621
622 TIME("memcpy_toio", count, memcpy_toio(memaddr, buf, count));
623 }
624
625 static void com90xx_copy_from_card(struct net_device *dev, int bufnum, int offset,
626 void *buf, int count)
627 {
628 struct arcnet_local *lp = netdev_priv(dev);
629 void __iomem *memaddr = lp->mem_start + bufnum * 512 + offset;
630
631 TIME("memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));
632 }
633
634 MODULE_LICENSE("GPL");
635
636 static int __init com90xx_init(void)
637 {
638 if (irq == 2)
639 irq = 9;
640 com90xx_probe();
641 if (!numcards)
642 return -EIO;
643 return 0;
644 }
645
646 static void __exit com90xx_exit(void)
647 {
648 struct net_device *dev;
649 struct arcnet_local *lp;
650 int count;
651
652 for (count = 0; count < numcards; count++) {
653 dev = cards[count];
654 lp = netdev_priv(dev);
655
656 unregister_netdev(dev);
657 free_irq(dev->irq, dev);
658 iounmap(lp->mem_start);
659 release_region(dev->base_addr, ARCNET_TOTAL_SIZE);
660 release_mem_region(dev->mem_start, dev->mem_end - dev->mem_start + 1);
661 free_netdev(dev);
662 }
663 }
664
665 module_init(com90xx_init);
666 module_exit(com90xx_exit);
667
668 #ifndef MODULE
669 static int __init com90xx_setup(char *s)
670 {
671 int ints[8];
672
673 s = get_options(s, 8, ints);
674 if (!ints[0] && !*s) {
675 printk("com90xx: Disabled.\n");
676 return 1;
677 }
678
679 switch (ints[0]) {
680 default: /* ERROR */
681 printk("com90xx: Too many arguments.\n");
682 case 3: /* Mem address */
683 shmem = ints[3];
684 case 2: /* IRQ */
685 irq = ints[2];
686 case 1: /* IO address */
687 io = ints[1];
688 }
689
690 if (*s)
691 snprintf(device, sizeof(device), "%s", s);
692
693 return 1;
694 }
695
696 __setup("com90xx=", com90xx_setup);
697 #endif
This page took 0.043581 seconds and 4 git commands to generate.