X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fserial%2F21285.c;h=f31c6698419ce99e410e9ac42c58bb1e9ef50df1;hb=678c610b5a069a0a76c3189dd9aa801e5d5cd7e0;hp=57438326b07f94549e32705801e16e8ced09acd5;hpb=6ab3d5624e172c553004ecc862bfeac16d9d68b7;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 5743832..f31c669 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c @@ -1,11 +1,9 @@ /* - * linux/drivers/char/21285.c + * linux/drivers/serial/21285.c * * Driver for the serial port on the 21285 StrongArm-110 core logic chip. * * Based on drivers/char/serial.c - * - * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $ */ #include #include @@ -21,7 +19,7 @@ #include #include #include -#include +#include #define BAUD_BASE (mem_fclk_21285/64) @@ -85,10 +83,10 @@ static void serial21285_enable_ms(struct uart_port *port) { } -static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t serial21285_rx_chars(int irq, void *dev_id) { struct uart_port *port = dev_id; - struct tty_struct *tty = port->info->tty; + struct tty_struct *tty = port->info->port.tty; unsigned int status, ch, flag, rxs, max_count = 256; status = *CSR_UARTFLG; @@ -123,7 +121,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *r return IRQ_HANDLED; } -static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t serial21285_tx_chars(int irq, void *dev_id) { struct uart_port *port = dev_id; struct circ_buf *xmit = &port->info->xmit; @@ -214,8 +212,8 @@ static void serial21285_shutdown(struct uart_port *port) } static void -serial21285_set_termios(struct uart_port *port, struct termios *termios, - struct termios *old) +serial21285_set_termios(struct uart_port *port, struct ktermios *termios, + struct ktermios *old) { unsigned long flags; unsigned int baud, quot, h_lcr; @@ -237,6 +235,12 @@ serial21285_set_termios(struct uart_port *port, struct termios *termios, baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); quot = uart_get_divisor(port, baud); + if (port->info && port->info->port.tty) { + struct tty_struct *tty = port->info->port.tty; + unsigned int b = port->uartclk / (16 * quot); + tty_encode_baud_rate(tty, b, b); + } + switch (termios->c_cflag & CSIZE) { case CS5: h_lcr = 0x00; @@ -488,7 +492,7 @@ static int __init serial21285_init(void) { int ret; - printk(KERN_INFO "Serial: 21285 driver $Revision: 1.37 $\n"); + printk(KERN_INFO "Serial: 21285 driver\n"); serial21285_setup_ports(); @@ -509,5 +513,5 @@ module_init(serial21285_init); module_exit(serial21285_exit); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver $Revision: 1.37 $"); +MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver"); MODULE_ALIAS_CHARDEV(SERIAL_21285_MAJOR, SERIAL_21285_MINOR);