aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250.c
diff options
context:
space:
mode:
authorSascha Hauer <sascha@saschahauer.de>2005-08-31 16:48:47 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-08-31 16:48:47 -0400
commit0f302dc35412dc67035efc188b9d5c40711b4222 (patch)
tree57cbbe8e722e6a82bfd8bb3b8227898c54615c72 /drivers/serial/8250.c
parentb129a8ccd53f74c43e4c83c8e0031a4990040830 (diff)
[ARM] 2866/1: add i.MX set_mctrl / get_mctrl functions
Patch from Sascha Hauer This patch adds support for setting and getting RTS / CTS via set_mtctrl / get_mctrl functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r--drivers/serial/8250.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index cedb5f2f35cc..30a0a3d10145 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2590,82 +2590,3 @@ module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444);
2590MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); 2590MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA");
2591#endif 2591#endif
2592MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); 2592MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR);
2593
2594/**
2595 * register_serial - configure a 16x50 serial port at runtime
2596 * @req: request structure
2597 *
2598 * Configure the serial port specified by the request. If the
2599 * port exists and is in use an error is returned. If the port
2600 * is not currently in the table it is added.
2601 *
2602 * The port is then probed and if necessary the IRQ is autodetected
2603 * If this fails an error is returned.
2604 *
2605 * On success the port is ready to use and the line number is returned.
2606 *
2607 * Note: this function is deprecated - use serial8250_register_port
2608 * instead.
2609 */
2610int register_serial(struct serial_struct *req)
2611{
2612 struct uart_port port;
2613
2614 port.iobase = req->port;
2615 port.membase = req->iomem_base;
2616 port.irq = req->irq;
2617 port.uartclk = req->baud_base * 16;
2618 port.fifosize = req->xmit_fifo_size;
2619 port.regshift = req->iomem_reg_shift;
2620 port.iotype = req->io_type;
2621 port.flags = req->flags | UPF_BOOT_AUTOCONF;
2622 port.mapbase = req->iomap_base;
2623 port.dev = NULL;
2624
2625 if (share_irqs)
2626 port.flags |= UPF_SHARE_IRQ;
2627
2628 if (HIGH_BITS_OFFSET)
2629 port.iobase |= (long) req->port_high << HIGH_BITS_OFFSET;
2630
2631 /*
2632 * If a clock rate wasn't specified by the low level driver, then
2633 * default to the standard clock rate. This should be 115200 (*16)
2634 * and should not depend on the architecture's BASE_BAUD definition.
2635 * However, since this API will be deprecated, it's probably a
2636 * better idea to convert the drivers to use the new API
2637 * (serial8250_register_port and serial8250_unregister_port).
2638 */
2639 if (port.uartclk == 0) {
2640 printk(KERN_WARNING
2641 "Serial: registering port at [%08x,%08lx,%p] irq %d with zero baud_base\n",
2642 port.iobase, port.mapbase, port.membase, port.irq);
2643 printk(KERN_WARNING "Serial: see %s:%d for more information\n",
2644 __FILE__, __LINE__);
2645 dump_stack();
2646
2647 /*
2648 * Fix it up for now, but this is only a temporary measure.
2649 */
2650 port.uartclk = BASE_BAUD * 16;
2651 }
2652
2653 return serial8250_register_port(&port);
2654}
2655EXPORT_SYMBOL(register_serial);
2656
2657/**
2658 * unregister_serial - remove a 16x50 serial port at runtime
2659 * @line: serial line number
2660 *
2661 * Remove one serial port. This may not be called from interrupt
2662 * context. We hand the port back to our local PM control.
2663 *
2664 * Note: this function is deprecated - use serial8250_unregister_port
2665 * instead.
2666 */
2667void unregister_serial(int line)
2668{
2669 serial8250_unregister_port(line);
2670}
2671EXPORT_SYMBOL(unregister_serial);