0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _ASM_POWERPC_PARPORT_H
0011 #define _ASM_POWERPC_PARPORT_H
0012 #ifdef __KERNEL__
0013
0014 #include <linux/of_irq.h>
0015
0016 static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
0017 {
0018 struct device_node *np;
0019 const u32 *prop;
0020 u32 io1, io2;
0021 int propsize;
0022 int count = 0;
0023 int virq;
0024
0025 for_each_compatible_node(np, "parallel", "pnpPNP,400") {
0026 prop = of_get_property(np, "reg", &propsize);
0027 if (!prop || propsize > 6*sizeof(u32))
0028 continue;
0029 io1 = prop[1]; io2 = prop[2];
0030
0031 virq = irq_of_parse_and_map(np, 0);
0032 if (!virq)
0033 continue;
0034
0035 if (parport_pc_probe_port(io1, io2, virq, autodma, NULL, 0)
0036 != NULL)
0037 count++;
0038 }
0039 return count;
0040 }
0041
0042 #endif
0043 #endif