diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
commit | d6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch) | |
tree | e2be02f33984c48ec019c654051d27964e42c441 /include/asm-alpha/parport.h | |
parent | 609d1e803baf519487233b765eb487f9ec227a18 (diff) |
Merge with 2.3.19.
Diffstat (limited to 'include/asm-alpha/parport.h')
-rw-r--r-- | include/asm-alpha/parport.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/include/asm-alpha/parport.h b/include/asm-alpha/parport.h new file mode 100644 index 000000000..e9b590ee1 --- /dev/null +++ b/include/asm-alpha/parport.h @@ -0,0 +1,59 @@ +/* + * parport.h: platform-specific PC-style parport initialisation + * + * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk> + * + * This file should only be included by drivers/parport/parport_pc.c. + */ + +#ifndef _ASM_AXP_PARPORT_H +#define _ASM_AXP_PARPORT_H 1 + +#include <linux/config.h> + +/* Maximum number of ports to support. It is useless to set this greater + than PARPORT_MAX (in <linux/parport.h>). */ +#define PARPORT_PC_MAX_PORTS 8 + +/* If parport_cs (PCMCIA) is managing ports for us, we'll need the + * probing routines forever; otherwise we can lose them at boot time. */ +#ifdef CONFIG_PARPORT_PC_PCMCIA +#define __maybe_initdata +#define __maybe_init +#else +#define __maybe_initdata __initdata +#define __maybe_init __init +#endif + +static int __maybe_init parport_pc_init_pci(int irq, int dma); + +static int user_specified __maybe_initdata = 0; +int __init +parport_pc_init(int *io, int *io_hi, int *irq, int *dma) +{ + int count = 0, i = 0; + + if (io && *io) { + /* Only probe the ports we were given. */ + user_specified = 1; + do { + if (!*io_hi) *io_hi = 0x400 + *io; + if (parport_pc_probe_port(*(io++), *(io_hi++), + *(irq++), *(dma++))) + count++; + } while (*io && (++i < PARPORT_PC_MAX_PORTS)); + } else { + /* Probe all the likely ports. */ + if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0])) + count++; + if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0])) + count++; + if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0])) + count++; + count += parport_pc_init_pci (irq[0], dma[0]); + } + + return count; +} + +#endif /* !(_ASM_AXP_PARPORT_H) */ |