mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
msm: fixups to match current code
The tty layer is now a bit more fussy about reporting the right baud rate back. Make the msm driver match the current state of affairs. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
04896a77a9
commit
44da59e400
1 changed files with 8 additions and 3 deletions
|
@ -229,7 +229,7 @@ static void msm_break_ctl(struct uart_port *port, int break_ctl)
|
||||||
msm_write(port, UART_CR_CMD_STOP_BREAK, UART_CR);
|
msm_write(port, UART_CR_CMD_STOP_BREAK, UART_CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void msm_set_baud_rate(struct uart_port *port, unsigned int baud)
|
static int msm_set_baud_rate(struct uart_port *port, unsigned int baud)
|
||||||
{
|
{
|
||||||
unsigned int baud_code, rxstale, watermark;
|
unsigned int baud_code, rxstale, watermark;
|
||||||
|
|
||||||
|
@ -281,6 +281,7 @@ static void msm_set_baud_rate(struct uart_port *port, unsigned int baud)
|
||||||
case 115200:
|
case 115200:
|
||||||
default:
|
default:
|
||||||
baud_code = UART_CSR_115200;
|
baud_code = UART_CSR_115200;
|
||||||
|
baud = 115200;
|
||||||
rxstale = 31;
|
rxstale = 31;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -299,6 +300,8 @@ static void msm_set_baud_rate(struct uart_port *port, unsigned int baud)
|
||||||
|
|
||||||
/* set TX watermark */
|
/* set TX watermark */
|
||||||
msm_write(port, 10, UART_TFWR);
|
msm_write(port, 10, UART_TFWR);
|
||||||
|
|
||||||
|
return baud;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void msm_reset(struct uart_port *port)
|
static void msm_reset(struct uart_port *port)
|
||||||
|
@ -395,7 +398,9 @@ static void msm_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||||
|
|
||||||
/* calculate and set baud rate */
|
/* calculate and set baud rate */
|
||||||
baud = uart_get_baud_rate(port, termios, old, 300, 115200);
|
baud = uart_get_baud_rate(port, termios, old, 300, 115200);
|
||||||
msm_set_baud_rate(port, baud);
|
baud = msm_set_baud_rate(port, baud);
|
||||||
|
if (tty_termios_baud_rate(termios))
|
||||||
|
tty_termios_encode_baud_rate(termios, baud, baud);
|
||||||
|
|
||||||
/* calculate parity */
|
/* calculate parity */
|
||||||
mr = msm_read(port, UART_MR2);
|
mr = msm_read(port, UART_MR2);
|
||||||
|
|
Loading…
Reference in a new issue