]> git.baikalelectronics.ru Git - kernel.git/commit
serial: samsung: optimize UART rx fifo access routine
authorYoungmin Nam <ym0914@gmail.com>
Sat, 5 Mar 2016 10:36:32 +0000 (19:36 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2016 00:11:14 +0000 (16:11 -0800)
commitfa492c7a4634a00f56c2806d4af557cd468920d7
treed54f1708123e3a183725a6471a8919a198c129c5
parent58676788d131ee1daa5e30c96384f47228decb14
serial: samsung: optimize UART rx fifo access routine

This patch optimizes UART rx fifo access routine by reading UART SFR
when necessary. At first, the "fifocnt" variable will be initialized
as Rx FIFO count. So we don't need to access UFSTAT(FIFO status) register
every time to check FIFO count because we know that count with "fifocnt".
After all data were read out from Rx FIFO, the "fifocnt" will be set as 0.
Lastly, UFSTAT will be accessed again to check whether the data remains
by any chance.

Signed-off-by: Youngmin Nam <ym0914@gmail.com>
Reviewed-by: Jung-Ick Guack <ji.guack@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/samsung.c