diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2015-02-07 12:46:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-06 21:13:08 -0500 |
commit | 4f86a95d75386b47178335599264a000601e01ed (patch) | |
tree | ea224aabb64e03c8e01ddc9813a758ff83d9c25e | |
parent | 16420ad05cdf82b27655a1e4554a8379a06c8075 (diff) |
serial: imx: Do not store/restore the UBRC register
UBRC is a read-only register, so we should not store and restore it inside
imx_flush_buffer().
Reported-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/imx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 412bfbf8730b..ca00b3f1520f 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -1320,7 +1320,7 @@ static void imx_flush_buffer(struct uart_port *port) | |||
1320 | struct imx_port *sport = (struct imx_port *)port; | 1320 | struct imx_port *sport = (struct imx_port *)port; |
1321 | struct scatterlist *sgl = &sport->tx_sgl[0]; | 1321 | struct scatterlist *sgl = &sport->tx_sgl[0]; |
1322 | unsigned long temp; | 1322 | unsigned long temp; |
1323 | int i = 100, ubir, ubmr, ubrc, uts; | 1323 | int i = 100, ubir, ubmr, uts; |
1324 | 1324 | ||
1325 | if (!sport->dma_chan_tx) | 1325 | if (!sport->dma_chan_tx) |
1326 | return; | 1326 | return; |
@@ -1345,7 +1345,6 @@ static void imx_flush_buffer(struct uart_port *port) | |||
1345 | */ | 1345 | */ |
1346 | ubir = readl(sport->port.membase + UBIR); | 1346 | ubir = readl(sport->port.membase + UBIR); |
1347 | ubmr = readl(sport->port.membase + UBMR); | 1347 | ubmr = readl(sport->port.membase + UBMR); |
1348 | ubrc = readl(sport->port.membase + UBRC); | ||
1349 | uts = readl(sport->port.membase + IMX21_UTS); | 1348 | uts = readl(sport->port.membase + IMX21_UTS); |
1350 | 1349 | ||
1351 | temp = readl(sport->port.membase + UCR2); | 1350 | temp = readl(sport->port.membase + UCR2); |
@@ -1358,7 +1357,6 @@ static void imx_flush_buffer(struct uart_port *port) | |||
1358 | /* Restore the registers */ | 1357 | /* Restore the registers */ |
1359 | writel(ubir, sport->port.membase + UBIR); | 1358 | writel(ubir, sport->port.membase + UBIR); |
1360 | writel(ubmr, sport->port.membase + UBMR); | 1359 | writel(ubmr, sport->port.membase + UBMR); |
1361 | writel(ubrc, sport->port.membase + UBRC); | ||
1362 | writel(uts, sport->port.membase + IMX21_UTS); | 1360 | writel(uts, sport->port.membase + IMX21_UTS); |
1363 | } | 1361 | } |
1364 | 1362 | ||