• Home
  • Raw
  • Download

Lines Matching refs:np

31 	struct device_node		*np;  member
72 static int __init add_legacy_port(struct device_node *np, int want_index, in add_legacy_port() argument
83 clk = of_get_property(np, "clock-frequency", NULL); in add_legacy_port()
88 spd = of_get_property(np, "current-speed", NULL); in add_legacy_port()
91 rs = of_get_property(np, "reg-shift", NULL); in add_legacy_port()
111 if (legacy_serial_infos[index].np != NULL) { in add_legacy_port()
140 legacy_serial_infos[index].np = of_node_get(np); in add_legacy_port()
151 index, np->full_name); in add_legacy_port()
161 static int __init add_legacy_soc_port(struct device_node *np, in add_legacy_soc_port() argument
166 struct device_node *tsi = of_get_parent(np); in add_legacy_soc_port()
171 if (of_get_property(np, "clock-frequency", NULL) == NULL) in add_legacy_soc_port()
175 if ((of_get_property(np, "reg-offset", NULL) != NULL)) in add_legacy_soc_port()
179 if (of_get_property(np, "used-by-rtas", NULL) != NULL) in add_legacy_soc_port()
195 return add_legacy_port(np, -1, UPIO_TSI, addr, addr, in add_legacy_soc_port()
198 return add_legacy_port(np, -1, UPIO_MEM, addr, addr, in add_legacy_soc_port()
202 static int __init add_legacy_isa_port(struct device_node *np, in add_legacy_isa_port() argument
210 DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); in add_legacy_isa_port()
213 reg = of_get_property(np, "reg", NULL); in add_legacy_isa_port()
224 typep = of_get_property(np, "ibm,aix-loc", NULL); in add_legacy_isa_port()
237 taddr = of_translate_address(np, reg); in add_legacy_isa_port()
244 return add_legacy_port(np, index, UPIO_PORT, be32_to_cpu(reg[1]), in add_legacy_isa_port()
250 static int __init add_legacy_pci_port(struct device_node *np, in add_legacy_pci_port() argument
258 DBG(" -> add_legacy_pci_port(%s)\n", np->full_name); in add_legacy_pci_port()
267 if (of_get_property(np, "clock-frequency", NULL) == NULL) in add_legacy_pci_port()
292 if (np != pci_dev) { in add_legacy_pci_port()
293 const __be32 *reg = of_get_property(np, "reg", NULL); in add_legacy_pci_port()
317 return add_legacy_port(np, index, iotype, base, addr, NO_IRQ, in add_legacy_pci_port()
318 legacy_port_flags, np != pci_dev); in add_legacy_pci_port()
365 struct device_node *np, *stdout = NULL; in find_legacy_serial_ports() local
382 for_each_compatible_node(np, "serial", "ns16550") { in find_legacy_serial_ports()
383 struct device_node *parent = of_get_parent(np); in find_legacy_serial_ports()
387 if (of_device_is_available(np)) { in find_legacy_serial_ports()
388 index = add_legacy_soc_port(np, np); in find_legacy_serial_ports()
389 if (index >= 0 && np == stdout) in find_legacy_serial_ports()
397 for_each_node_by_type(np, "serial") { in find_legacy_serial_ports()
398 struct device_node *isa = of_get_parent(np); in find_legacy_serial_ports()
401 if (of_device_is_available(np)) { in find_legacy_serial_ports()
402 index = add_legacy_isa_port(np, isa); in find_legacy_serial_ports()
403 if (index >= 0 && np == stdout) in find_legacy_serial_ports()
412 for (np = NULL; (np = of_find_all_nodes(np));) { in find_legacy_serial_ports()
413 struct device_node *pci, *parent = of_get_parent(np); in find_legacy_serial_ports()
418 if (strcmp(np->name, "serial") && strcmp(np->type, "serial")) { in find_legacy_serial_ports()
425 if (of_device_is_compatible(np, "pciclass,0700") || in find_legacy_serial_ports()
426 of_device_is_compatible(np, "pciclass,070002")) in find_legacy_serial_ports()
427 pci = np; in find_legacy_serial_ports()
435 index = add_legacy_pci_port(np, pci); in find_legacy_serial_ports()
436 if (index >= 0 && np == stdout) in find_legacy_serial_ports()
457 struct device_node *np, in fixup_port_irq() argument
464 virq = irq_of_parse_and_map(np, 0); in fixup_port_irq()
466 np = of_get_parent(np); in fixup_port_irq()
467 if (np == NULL) in fixup_port_irq()
469 virq = irq_of_parse_and_map(np, 0); in fixup_port_irq()
470 of_node_put(np); in fixup_port_irq()
478 if (of_device_is_compatible(np, "fsl,ns16550")) in fixup_port_irq()
484 struct device_node *np, in fixup_port_pio() argument
492 hose = pci_find_hose_for_OF_device(np); in fixup_port_pio()
508 struct device_node *np, in fixup_port_mmio() argument
544 struct device_node *np = legacy_serial_infos[i].np; in serial_dev_init() local
547 fixup_port_irq(i, np, port); in serial_dev_init()
549 fixup_port_pio(i, np, port); in serial_dev_init()
551 fixup_port_mmio(i, np, port); in serial_dev_init()
621 if (prom_stdout != legacy_serial_infos[i].np) in check_legacy_serial_console()