diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2012-10-14 03:05:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-24 14:39:48 -0400 |
commit | f52ede2ac1159f844994519ae0386def308a296b (patch) | |
tree | 491861b0f7cba90a85d4f4f53766ebd05f0026c6 | |
parent | 135cc7903593af78c45dc3f8e6a1f528f083e002 (diff) |
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>
-rw-r--r-- | drivers/tty/serial/clps711x.c | 29 |
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) | |||
231 | static int clps711xuart_startup(struct uart_port *port) | 231 | static int clps711xuart_startup(struct uart_port *port) |
232 | { | 232 | { |
233 | struct clps711x_port *s = dev_get_drvdata(port->dev); | 233 | struct clps711x_port *s = dev_get_drvdata(port->dev); |
234 | unsigned int syscon; | ||
235 | int ret; | 234 | int ret; |
236 | 235 | ||
237 | s->tx_enabled[port->line] = 1; | 236 | s->tx_enabled[port->line] = 1; |
@@ -248,37 +247,23 @@ static int clps711xuart_startup(struct uart_port *port) | |||
248 | return ret; | 247 | return ret; |
249 | } | 248 | } |
250 | 249 | ||
251 | /* | 250 | /* Disable break */ |
252 | * enable the port | 251 | clps_writel(clps_readl(UBRLCR(port)) & ~UBRLCR_BREAK, UBRLCR(port)); |
253 | */ | 252 | |
254 | syscon = clps_readl(SYSCON(port)); | 253 | /* Enable the port */ |
255 | syscon |= SYSCON_UARTEN; | 254 | clps_writel(clps_readl(SYSCON(port)) | SYSCON_UARTEN, SYSCON(port)); |
256 | clps_writel(syscon, SYSCON(port)); | ||
257 | 255 | ||
258 | return 0; | 256 | return 0; |
259 | } | 257 | } |
260 | 258 | ||
261 | static void clps711xuart_shutdown(struct uart_port *port) | 259 | static void clps711xuart_shutdown(struct uart_port *port) |
262 | { | 260 | { |
263 | unsigned int ubrlcr, syscon; | ||
264 | |||
265 | /* Free the interrupts */ | 261 | /* Free the interrupts */ |
266 | devm_free_irq(port->dev, TX_IRQ(port), port); | 262 | devm_free_irq(port->dev, TX_IRQ(port), port); |
267 | devm_free_irq(port->dev, RX_IRQ(port), port); | 263 | devm_free_irq(port->dev, RX_IRQ(port), port); |
268 | 264 | ||
269 | /* | 265 | /* Disable the port */ |
270 | * disable the port | 266 | clps_writel(clps_readl(SYSCON(port)) & ~SYSCON_UARTEN, SYSCON(port)); |
271 | */ | ||
272 | syscon = clps_readl(SYSCON(port)); | ||
273 | syscon &= ~SYSCON_UARTEN; | ||
274 | clps_writel(syscon, SYSCON(port)); | ||
275 | |||
276 | /* | ||
277 | * disable break condition and fifos | ||
278 | */ | ||
279 | ubrlcr = clps_readl(UBRLCR(port)); | ||
280 | ubrlcr &= ~(UBRLCR_FIFOEN | UBRLCR_BREAK); | ||
281 | clps_writel(ubrlcr, UBRLCR(port)); | ||
282 | } | 267 | } |
283 | 268 | ||
284 | static void | 269 | static void |