Commit f52ede2a authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Greg Kroah-Hartman

serial: clps711x: Disable "break"-state before port startup

Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 135cc790
...@@ -231,7 +231,6 @@ static void clps711xuart_break_ctl(struct uart_port *port, int break_state) ...@@ -231,7 +231,6 @@ static void clps711xuart_break_ctl(struct uart_port *port, int break_state)
static int clps711xuart_startup(struct uart_port *port) static int clps711xuart_startup(struct uart_port *port)
{ {
struct clps711x_port *s = dev_get_drvdata(port->dev); struct clps711x_port *s = dev_get_drvdata(port->dev);
unsigned int syscon;
int ret; int ret;
s->tx_enabled[port->line] = 1; s->tx_enabled[port->line] = 1;
...@@ -248,37 +247,23 @@ static int clps711xuart_startup(struct uart_port *port) ...@@ -248,37 +247,23 @@ static int clps711xuart_startup(struct uart_port *port)
return ret; return ret;
} }
/* /* Disable break */
* enable the port clps_writel(clps_readl(UBRLCR(port)) & ~UBRLCR_BREAK, UBRLCR(port));
*/
syscon = clps_readl(SYSCON(port)); /* Enable the port */
syscon |= SYSCON_UARTEN; clps_writel(clps_readl(SYSCON(port)) | SYSCON_UARTEN, SYSCON(port));
clps_writel(syscon, SYSCON(port));
return 0; return 0;
} }
static void clps711xuart_shutdown(struct uart_port *port) static void clps711xuart_shutdown(struct uart_port *port)
{ {
unsigned int ubrlcr, syscon;
/* Free the interrupts */ /* Free the interrupts */
devm_free_irq(port->dev, TX_IRQ(port), port); devm_free_irq(port->dev, TX_IRQ(port), port);
devm_free_irq(port->dev, RX_IRQ(port), port); devm_free_irq(port->dev, RX_IRQ(port), port);
/* /* Disable the port */
* disable the port clps_writel(clps_readl(SYSCON(port)) & ~SYSCON_UARTEN, SYSCON(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));
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment