]> git.baikalelectronics.ru Git - kernel.git/commit
serial: fsl_lpuart: restore UARTCR2 after watermark setup is done
authorShawn Guo <shawn.guo@linaro.org>
Mon, 8 Jul 2013 07:53:38 +0000 (15:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 23:01:20 +0000 (16:01 -0700)
commit8cec5d978e5a13cf6b2d3c7c8a6e5f44f02a7386
tree1745f0c78fa1d63354606e842c7e453094403b51
parent92beb9a6a615e1976739961573575814865ca75b
serial: fsl_lpuart: restore UARTCR2 after watermark setup is done

Function lpuart_setup_watermark() clears some bits in register UARTCR2
before writing FIFO configuration registers as required by hardware.
But it should restore UARTCR2 after that.  Otherwise, we end up changing
UARTCR2 register when setting up watermark, and that is not really
desirable.  At least, when low-level debug and earlyprint is enabled,
serial console is broken due to it.

Fix the problem by restoring UARTCR2 register at the end of function
lpuart_setup_watermark().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c