summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/clps711x.c
diff options
context:
space:
mode:
authorAlexander Shiyan2012-10-14 09:05:32 +0200
committerGreg Kroah-Hartman2012-10-24 20:39:48 +0200
commitf52ede2ac1159f844994519ae0386def308a296b (patch)
tree491861b0f7cba90a85d4f4f53766ebd05f0026c6 /drivers/tty/serial/clps711x.c
parentserial: clps711x: Using resource-managed functions (diff)
downloadkernel-qcow2-linux-f52ede2ac1159f844994519ae0386def308a296b.tar.gz
kernel-qcow2-linux-f52ede2ac1159f844994519ae0386def308a296b.tar.xz
kernel-qcow2-linux-f52ede2ac1159f844994519ae0386def308a296b.zip
serial: clps711x: Disable "break"-state before port startup
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/clps711x.c')
-rw-r--r--drivers/tty/serial/clps711x.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index 7cf392829ff1..e71508767e1e 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -231,7 +231,6 @@ static void clps711xuart_break_ctl(struct uart_port *port, int break_state)
static int clps711xuart_startup(struct uart_port *port)
{
struct clps711x_port *s = dev_get_drvdata(port->dev);
- unsigned int syscon;
int ret;
s->tx_enabled[port->line] = 1;
@@ -248,37 +247,23 @@ static int clps711xuart_startup(struct uart_port *port)
return ret;
}
- /*
- * enable the port
- */
- syscon = clps_readl(SYSCON(port));
- syscon |= SYSCON_UARTEN;
- clps_writel(syscon, SYSCON(port));
+ /* Disable break */
+ clps_writel(clps_readl(UBRLCR(port)) & ~UBRLCR_BREAK, UBRLCR(port));
+
+ /* Enable the port */
+ clps_writel(clps_readl(SYSCON(port)) | SYSCON_UARTEN, SYSCON(port));
return 0;
}
static void clps711xuart_shutdown(struct uart_port *port)
{
- unsigned int ubrlcr, syscon;
-
/* Free the interrupts */
devm_free_irq(port->dev, TX_IRQ(port), port);
devm_free_irq(port->dev, RX_IRQ(port), port);
- /*
- * disable the port
- */
- syscon = clps_readl(SYSCON(port));
- syscon &= ~SYSCON_UARTEN;
- clps_writel(syscon, SYSCON(port));
-
- /*
- * disable break condition and fifos
- */
- ubrlcr = clps_readl(UBRLCR(port));
- ubrlcr &= ~(UBRLCR_FIFOEN | UBRLCR_BREAK);
- clps_writel(ubrlcr, UBRLCR(port));
+ /* Disable the port */
+ clps_writel(clps_readl(SYSCON(port)) & ~SYSCON_UARTEN, SYSCON(port));
}
static void