1
2
3
4
5
6
7
8
9#ifndef _ASM_POWERPC_PARPORT_H
10#define _ASM_POWERPC_PARPORT_H
11#ifdef __KERNEL__
12
13#include <asm/prom.h>
14
15static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
16{
17 struct device_node *np;
18 const u32 *prop;
19 u32 io1, io2;
20 int propsize;
21 int count = 0;
22 int virq;
23
24 for_each_compatible_node(np, "parallel", "pnpPNP,400") {
25 prop = of_get_property(np, "reg", &propsize);
26 if (!prop || propsize > 6*sizeof(u32))
27 continue;
28 io1 = prop[1]; io2 = prop[2];
29
30 virq = irq_of_parse_and_map(np, 0);
31 if (virq == NO_IRQ)
32 continue;
33
34 if (parport_pc_probe_port(io1, io2, virq, autodma, NULL, 0)
35 != NULL)
36 count++;
37 }
38 return count;
39}
40
41#endif
42#endif
43