diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-10-24 11:00:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-10 16:30:09 +0300 |
commit | da7fa058a36cd8d4ebd42001fa72a40c0aefd6e3 (patch) | |
tree | 614752aebce84ab25854f5c87042a1caa79b586d /drivers/tty | |
parent | 94cbb6978b63d004502eed24417aceb7b36bc10a (diff) | |
download | linux-da7fa058a36cd8d4ebd42001fa72a40c0aefd6e3.tar.xz |
serial: 8250_uniphier: avoid locking for FCR register write
The hardware book says, the FCR is combined with a register called
CHAR (it will trigger interrupt when a specific character is
received). At first, I used lock/read/modify/write/unlock dance for
the FCR to not affect the upper bits, but the CHAR is actually never
used. It should not hurt to always clear the CHAR and to handle the
FCR as a normal case. It can save the costly locking.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Suggested-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_uniphier.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c index 92e7bb7b3f83..746680ebf90c 100644 --- a/drivers/tty/serial/8250/8250_uniphier.c +++ b/drivers/tty/serial/8250/8250_uniphier.c @@ -101,7 +101,7 @@ static unsigned int uniphier_serial_in(struct uart_port *p, int offset) static void uniphier_serial_out(struct uart_port *p, int offset, int value) { unsigned int valshift = 0; - bool normal = false; + bool normal = true; switch (offset) { case UART_FCR: @@ -114,9 +114,9 @@ static void uniphier_serial_out(struct uart_port *p, int offset, int value) /* fall through */ case UART_MCR: offset = UNIPHIER_UART_LCR_MCR; + normal = false; break; default: - normal = true; offset <<= UNIPHIER_UART_REGSHIFT; break; } |