Lines Matching +full:stdout +full:- +full:path
15 #include <asm/pci-bridge.h>
16 #include <asm/ppc-pci.h>
40 {.type = "tsi-bridge",},
43 {.compatible = "simple-bus",},
44 {.compatible = "wrs,epld-localbus",},
49 static int legacy_serial_console = -1;
54 offset = offset << p->regshift; in tsi_serial_in()
56 tmp = readl(p->membase + (UART_IIR & ~3)); in tsi_serial_in()
59 return readb(p->membase + offset); in tsi_serial_in()
64 offset = offset << p->regshift; in tsi_serial_out()
66 writeb(value, p->membase + offset); in tsi_serial_out()
79 clk = of_get_property(np, "clock-frequency", NULL); in add_legacy_port()
84 spd = of_get_property(np, "current-speed", NULL); in add_legacy_port()
97 return -1; in add_legacy_port()
105 printk(KERN_DEBUG "Moved legacy port %d -> %d\n", in add_legacy_port()
141 index, np->full_name); in add_legacy_port()
161 * encoded in the device-tree. in add_legacy_soc_port()
163 if (of_get_property(np, "clock-frequency", NULL) == NULL) in add_legacy_soc_port()
164 return -1; in add_legacy_soc_port()
166 /* if reg-shift or offset, don't try to use it */ in add_legacy_soc_port()
167 if ((of_get_property(np, "reg-shift", NULL) != NULL) || in add_legacy_soc_port()
168 (of_get_property(np, "reg-offset", NULL) != NULL)) in add_legacy_soc_port()
169 return -1; in add_legacy_soc_port()
172 if (of_get_property(np, "used-by-rtas", NULL) != NULL) in add_legacy_soc_port()
173 return -1; in add_legacy_soc_port()
178 return -1; in add_legacy_soc_port()
182 return -1; in add_legacy_soc_port()
187 if (tsi && !strcmp(tsi->type, "tsi-bridge")) in add_legacy_soc_port()
188 return add_legacy_port(np, -1, UPIO_TSI, addr, addr, NO_IRQ, flags, 0); in add_legacy_soc_port()
190 return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags, 0); in add_legacy_soc_port()
198 int index = -1; in add_legacy_isa_port()
201 DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); in add_legacy_isa_port()
206 return -1; in add_legacy_isa_port()
210 return -1; in add_legacy_isa_port()
212 /* Now look for an "ibm,aix-loc" property that gives us ordering in add_legacy_isa_port()
215 typep = of_get_property(np, "ibm,aix-loc", NULL); in add_legacy_isa_port()
219 index = simple_strtol(typep+1, NULL, 0) - 1; in add_legacy_isa_port()
242 int iotype, index = -1, lindex = 0; in add_legacy_pci_port()
244 DBG(" -> add_legacy_pci_port(%s)\n", np->full_name); in add_legacy_pci_port()
247 * encoded in the device-tree (that is have an fcode). Anything in add_legacy_pci_port()
253 if (of_get_property(np, "clock-frequency", NULL) == NULL) in add_legacy_pci_port()
254 return -1; in add_legacy_pci_port()
259 return -1; in add_legacy_pci_port()
265 return -1; in add_legacy_pci_port()
314 if (info->taddr == 0) in setup_legacy_serial_console()
316 addr = ioremap(info->taddr, 0x1000); in setup_legacy_serial_console()
319 if (info->speed == 0) in setup_legacy_serial_console()
320 info->speed = udbg_probe_uart_speed(addr, info->clock); in setup_legacy_serial_console()
321 DBG("default console speed = %d\n", info->speed); in setup_legacy_serial_console()
322 udbg_init_uart(addr, info->speed, info->clock); in setup_legacy_serial_console()
328 * will try to build a list of all the available 8250-compatible serial ports
329 * in the machine using the Open Firmware device-tree. It currently only deals
332 * the machine non-PCI ports and to properly pick the default console port
336 struct device_node *np, *stdout = NULL; in find_legacy_serial_ports() local
337 const char *path; in find_legacy_serial_ports() local
340 DBG(" -> find_legacy_serial_port()\n"); in find_legacy_serial_ports()
343 path = of_get_property(of_chosen, "linux,stdout-path", NULL); in find_legacy_serial_ports()
344 if (path != NULL) { in find_legacy_serial_ports()
345 stdout = of_find_node_by_path(path); in find_legacy_serial_ports()
346 if (stdout) in find_legacy_serial_ports()
347 DBG("stdout is %s\n", stdout->full_name); in find_legacy_serial_ports()
349 DBG(" no linux,stdout-path !\n"); in find_legacy_serial_ports()
360 if (index >= 0 && np == stdout) in find_legacy_serial_ports()
370 if (isa && !strcmp(isa->name, "isa")) { in find_legacy_serial_ports()
372 if (index >= 0 && np == stdout) in find_legacy_serial_ports()
382 if (parent && !strcmp(parent->name, "isa")) { in find_legacy_serial_ports()
386 if (strcmp(np->name, "serial") && strcmp(np->type, "serial")) { in find_legacy_serial_ports()
404 if (index >= 0 && np == stdout) in find_legacy_serial_ports()
413 DBG(" <- find_legacy_serial_port()\n"); in find_legacy_serial_ports()
443 port->irq = virq; in fixup_port_irq()
447 port->handle_irq = fsl8250_handle_irq; in fixup_port_irq()
462 unsigned long offset = (unsigned long)hose->io_base_virt - in fixup_port_pio()
468 DBG("port %d, IO %lx -> %lx\n", in fixup_port_pio()
469 index, port->iobase, port->iobase + offset); in fixup_port_pio()
470 port->iobase += offset; in fixup_port_pio()
481 port->membase = ioremap(port->mapbase, 0x100); in fixup_port_mmio()
502 return -ENODEV; in serial_dev_init()
514 if (port->irq == NO_IRQ) in serial_dev_init()
516 if (port->iotype == UPIO_PORT) in serial_dev_init()
518 if ((port->iotype == UPIO_MEM) || (port->iotype == UPIO_TSI)) in serial_dev_init()
544 DBG(" -> check_legacy_serial_console()\n"); in check_legacy_serial_console()
549 return -EBUSY; in check_legacy_serial_console()
554 return -ENODEV; in check_legacy_serial_console()
559 return -ENODEV; in check_legacy_serial_console()
562 /* ... So use the full path instead */ in check_legacy_serial_console()
563 name = of_get_property(of_chosen, "linux,stdout-path", NULL); in check_legacy_serial_console()
565 DBG(" no linux,stdout-path !\n"); in check_legacy_serial_console()
566 return -ENODEV; in check_legacy_serial_console()
570 DBG(" can't find stdout package %s !\n", name); in check_legacy_serial_console()
571 return -ENODEV; in check_legacy_serial_console()
573 DBG("stdout is %s\n", prom_stdout->full_name); in check_legacy_serial_console()
577 DBG(" stdout package has no name !\n"); in check_legacy_serial_console()
580 spd = of_get_property(prom_stdout, "current-speed", NULL); in check_legacy_serial_console()
612 return -ENODEV; in check_legacy_serial_console()