diff options
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 79 |
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); | |||
2590 | MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); | 2590 | MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); |
2591 | #endif | 2591 | #endif |
2592 | MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); | 2592 | MODULE_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 | */ | ||
2610 | int 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 | } | ||
2655 | EXPORT_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 | */ | ||
2667 | void unregister_serial(int line) | ||
2668 | { | ||
2669 | serial8250_unregister_port(line); | ||
2670 | } | ||
2671 | EXPORT_SYMBOL(unregister_serial); | ||