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