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)
commitbc764b8fdb4346cb21f624e08231267d0ea9578b
tree1745f0c78fa1d63354606e842c7e453094403b51
parent908fd7e566b4c12e36e4487d2d5946de5e5ea30f
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