|
6 | 6 | * |
7 | 7 | * Copyright (C) 2000 Deep Blue Solutions Ltd. |
8 | 8 | * Copyright (C) 2003 Konrad Eisele <[email protected]> |
9 | | - * Copyright (C) 2006 Daniel Hellstrom <[email protected]>, Aeroflex Gaisler AB |
| 9 | + * Copyright (C) 2006 Daniel Hellstrom <[email protected]>, |
| 10 | + * Aeroflex Gaisler AB |
10 | 11 | * Copyright (C) 2008 Gilead Kutnick <[email protected]> |
11 | | - * Copyright (C) 2009 Kristoffer Glembo <[email protected]>, Aeroflex Gaisler AB |
| 12 | + * Copyright (C) 2009 Kristoffer Glembo <[email protected]>, |
| 13 | + * Aeroflex Gaisler AB |
12 | 14 | */ |
13 | 15 |
|
14 | | -#if defined(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
| 16 | +#if defined(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE) \ |
| 17 | + && defined(CONFIG_MAGIC_SYSRQ) |
15 | 18 | #define SUPPORT_SYSRQ |
16 | 19 | #endif |
17 | 20 |
|
@@ -116,8 +119,7 @@ static void apbuart_rx_chars(struct uart_port *port) |
116 | 119 |
|
117 | 120 | uart_insert_char(port, rsr, UART_STATUS_OE, ch, flag); |
118 | 121 |
|
119 | | - |
120 | | - ignore_char: |
| 122 | +ignore_char: |
121 | 123 | status = UART_GET_STATUS(port); |
122 | 124 | } |
123 | 125 |
|
@@ -181,6 +183,7 @@ static irqreturn_t apbuart_int(int irq, void *dev_id) |
181 | 183 | static unsigned int apbuart_tx_empty(struct uart_port *port) |
182 | 184 | { |
183 | 185 | unsigned int status = UART_GET_STATUS(port); |
| 186 | + |
184 | 187 | return status & UART_STATUS_THE ? TIOCSER_TEMT : 0; |
185 | 188 | } |
186 | 189 |
|
@@ -317,6 +320,7 @@ static int apbuart_verify_port(struct uart_port *port, |
317 | 320 | struct serial_struct *ser) |
318 | 321 | { |
319 | 322 | int ret = 0; |
| 323 | + |
320 | 324 | if (ser->type != PORT_UNKNOWN && ser->type != PORT_APBUART) |
321 | 325 | ret = -EINVAL; |
322 | 326 | if (ser->irq < 0 || ser->irq >= NR_IRQS) |
@@ -422,6 +426,7 @@ static void apbuart_flush_fifo(struct uart_port *port) |
422 | 426 | static void apbuart_console_putchar(struct uart_port *port, int ch) |
423 | 427 | { |
424 | 428 | unsigned int status; |
| 429 | + |
425 | 430 | do { |
426 | 431 | status = UART_GET_STATUS(port); |
427 | 432 | } while (!UART_TX_READY(status)); |
@@ -458,6 +463,7 @@ apbuart_console_get_options(struct uart_port *port, int *baud, |
458 | 463 | if (UART_GET_CTRL(port) & (UART_CTRL_RE | UART_CTRL_TE)) { |
459 | 464 |
|
460 | 465 | unsigned int quot, status; |
| 466 | + |
461 | 467 | status = UART_GET_STATUS(port); |
462 | 468 |
|
463 | 469 | *parity = 'n'; |
@@ -622,14 +628,16 @@ static int __init grlib_apbuart_configure(void) |
622 | 628 | port = &grlib_apbuart_ports[line]; |
623 | 629 |
|
624 | 630 | port->mapbase = addr; |
625 | | - port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); |
| 631 | + port->membase = ioremap(addr, |
| 632 | + sizeof(struct grlib_apbuart_regs_map)); |
626 | 633 | port->irq = 0; |
627 | 634 | port->iotype = UPIO_MEM; |
628 | 635 | port->ops = &grlib_apbuart_ops; |
629 | 636 | port->flags = UPF_BOOT_AUTOCONF; |
630 | 637 | port->line = line; |
631 | 638 | port->uartclk = *freq_hz; |
632 | | - port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); |
| 639 | + port->fifosize = apbuart_scan_fifo_size( |
| 640 | + (struct uart_port *) port, line); |
633 | 641 | line++; |
634 | 642 |
|
635 | 643 | /* We support maximum UART_NR uarts ... */ |
|
0 commit comments