summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64/parport.h
blob: 57683df444eedd5b7ed617b63edb2ebf2fd87f66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* $Id: parport.h,v 1.2 2000/02/18 00:24:48 ralf Exp $
 *
 * parport.h: ia32-specific 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_PARPORT_H
#define _ASM_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

static int parport_pc_init_pci(int irq, int dma);
static int parport_pc_init_superio(void);

static int user_specified __devinitdata = 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++), NULL))
				count++;
		} while (*io && (++i < PARPORT_PC_MAX_PORTS));
	} else {
		count += parport_pc_init_superio ();

		if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
			count++;
		if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
			count++;
		if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
			count++;
		
		/* probe for other PCI parallel devices */
		count += parport_pc_init_pci (irq[0], dma[0]);
	}

        return count;
}

#endif /* !(_ASM_PARPORT_H) */