2 * parport.h: ia32-specific parport initialisation
4 * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk>
6 * This file should only be included by drivers/parport/parport_pc.c.
9 #ifndef _ASM_I386_PARPORT_H
10 #define _ASM_I386_PARPORT_H 1
12 #include <linux/config.h>
14 /* Maximum number of ports to support. It is useless to set this greater
15 than PARPORT_MAX (in <linux/parport.h>). */
16 #define PARPORT_PC_MAX_PORTS 8
18 /* If parport_cs (PCMCIA) is managing ports for us, we'll need the
19 * probing routines forever; otherwise we can lose them at boot time. */
20 #ifdef CONFIG_PARPORT_PC_PCMCIA
21 #define __maybe_initdata
24 #define __maybe_initdata __initdata
25 #define __maybe_init __init
28 static int __maybe_init
parport_pc_init_pci(int irq
, int dma
);
30 static int user_specified __maybe_initdata
= 0;
32 parport_pc_init(int *io
, int *io_hi
, int *irq
, int *dma
)
37 /* Only probe the ports we were given. */
40 if (!*io_hi
) *io_hi
= 0x400 + *io
;
41 if (parport_pc_probe_port(*(io
++), *(io_hi
++),
44 } while (*io
&& (++i
< PARPORT_PC_MAX_PORTS
));
46 /* Probe all the likely ports. */
47 if (parport_pc_probe_port(0x3bc, 0x7bc, irq
[0], dma
[0]))
49 if (parport_pc_probe_port(0x378, 0x778, irq
[0], dma
[0]))
51 if (parport_pc_probe_port(0x278, 0x678, irq
[0], dma
[0]))
53 count
+= parport_pc_init_pci (irq
[0], dma
[0]);
59 #endif /* !(_ASM_I386_PARPORT_H) */