|
发表于 2017-4-7 14:28:32
只看该作者
7#
请尝试修改如下代码
--- a/kernel/drivers/tty/serial/rk_serial.c
+++ b/kernel/drivers/tty/serial/rk_serial.c
@@ -1425,6 +1425,7 @@ serial_rk_set_termios(struct uart_port *port, struct ktermios *termios,
baud = uart_get_baud_rate(port, termios, old,
port->uartclk / 16 / 0xffff,
port->uartclk / 16);
+/*
if ( port->baud > 0 && port->line != 0)
{
baud = port->baud;
@@ -1434,6 +1435,7 @@ else
{
printk("%d,baud is:%d\n",port->line,baud);
}
+*/
quot = uart_get_divisor(port, baud);
//dev_info(up->port.dev, "uartclk:%d\n", port->uartclk/16);
//dev_info(up->port.dev, "baud:%d\n", baud); |
|