From: Fabio Estevam Date: Tue, 13 Jan 2015 12:00:26 +0000 (-0200) Subject: serial: imx: Fix imx_flush_buffer() X-Git-Tag: fixes-v4.0-rc1~98^2~54 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=934084a9d2d95d0ce98ae8d1ec3bfe81c95c678c;p=pandora-kernel.git serial: imx: Fix imx_flush_buffer() When running an userspace program that does a 'tcflush(fd, TCIOFLUSH)' call we still see the last received character in the URXD register afterwards. Clear UCR2_SRST bit so that the UART FIFO is flushed properly. Since UCR2_SRST also resets some UART registers, we need to save and restore some of them. Signed-off-by: Fabio Estevam Tested-by: Fugang Duan Acked-by: Jason Liu Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed