aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/bfin_5xx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-20 18:55:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-20 18:55:17 -0400
commite11c675ede0d42a405ae595528bf0b29ce1ae56f (patch)
treee0ec481e66e4a4b70289d78992b209639a582c0c /drivers/serial/bfin_5xx.c
parent467f9957d9283be40101d7255d06fae7e211ff4c (diff)
parent7bd032dc2793afcbaf4a350056768da84cdbd89b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (79 commits) USB serial: update the console driver usb-serial: straighten out serial_open usb-serial: add missing tests and debug lines usb-serial: rename subroutines usb-serial: fix termios initialization logic usb-serial: acquire references when a new tty is installed usb-serial: change logic of serial lookups usb-serial: put subroutines in logical order usb-serial: change referencing of port and serial structures tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl tty: Char: mxser, add support for CP112UL uartlite: support shared interrupt lines tty: USB: serial/mct_u232, fix tty refcnt tty: riscom8, fix tty refcnt tty: riscom8, fix shutdown declaration TTY: fix typos tty: Power: fix suspend vt regression tty: vt: use printk_once tty: handle VT specific compat ioctls in vt driver n_tty: move echoctl check and clean up logic ...
Diffstat (limited to 'drivers/serial/bfin_5xx.c')
-rw-r--r--drivers/serial/bfin_5xx.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index b4a7650af696..50abb7e557f4 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -42,6 +42,10 @@
42# undef CONFIG_EARLY_PRINTK 42# undef CONFIG_EARLY_PRINTK
43#endif 43#endif
44 44
45#ifdef CONFIG_SERIAL_BFIN_MODULE
46# undef CONFIG_EARLY_PRINTK
47#endif
48
45/* UART name and device definitions */ 49/* UART name and device definitions */
46#define BFIN_SERIAL_NAME "ttyBF" 50#define BFIN_SERIAL_NAME "ttyBF"
47#define BFIN_SERIAL_MAJOR 204 51#define BFIN_SERIAL_MAJOR 204
@@ -140,7 +144,7 @@ static void bfin_serial_stop_tx(struct uart_port *port)
140{ 144{
141 struct bfin_serial_port *uart = (struct bfin_serial_port *)port; 145 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
142#ifdef CONFIG_SERIAL_BFIN_DMA 146#ifdef CONFIG_SERIAL_BFIN_DMA
143 struct circ_buf *xmit = &uart->port.info->xmit; 147 struct circ_buf *xmit = &uart->port.state->xmit;
144#endif 148#endif
145 149
146 while (!(UART_GET_LSR(uart) & TEMT)) 150 while (!(UART_GET_LSR(uart) & TEMT))
@@ -167,7 +171,7 @@ static void bfin_serial_stop_tx(struct uart_port *port)
167static void bfin_serial_start_tx(struct uart_port *port) 171static void bfin_serial_start_tx(struct uart_port *port)
168{ 172{
169 struct bfin_serial_port *uart = (struct bfin_serial_port *)port; 173 struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
170 struct tty_struct *tty = uart->port.info->port.tty; 174 struct tty_struct *tty = uart->port.state->port.tty;
171 175
172#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 176#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
173 if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) { 177 if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
@@ -239,10 +243,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
239 return; 243 return;
240 } 244 }
241 245
242 if (!uart->port.info || !uart->port.info->port.tty) 246 if (!uart->port.state || !uart->port.state->port.tty)
243 return; 247 return;
244#endif 248#endif
245 tty = uart->port.info->port.tty; 249 tty = uart->port.state->port.tty;
246 250
247 if (ANOMALY_05000363) { 251 if (ANOMALY_05000363) {
248 /* The BF533 (and BF561) family of processors have a nice anomaly 252 /* The BF533 (and BF561) family of processors have a nice anomaly
@@ -327,7 +331,7 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
327 331
328static void bfin_serial_tx_chars(struct bfin_serial_port *uart) 332static void bfin_serial_tx_chars(struct bfin_serial_port *uart)
329{ 333{
330 struct circ_buf *xmit = &uart->port.info->xmit; 334 struct circ_buf *xmit = &uart->port.state->xmit;
331 335
332 if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) { 336 if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
333#ifdef CONFIG_BF54x 337#ifdef CONFIG_BF54x
@@ -394,7 +398,7 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
394#ifdef CONFIG_SERIAL_BFIN_DMA 398#ifdef CONFIG_SERIAL_BFIN_DMA
395static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) 399static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
396{ 400{
397 struct circ_buf *xmit = &uart->port.info->xmit; 401 struct circ_buf *xmit = &uart->port.state->xmit;
398 402
399 uart->tx_done = 0; 403 uart->tx_done = 0;
400 404
@@ -432,7 +436,7 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
432 436
433static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart) 437static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
434{ 438{
435 struct tty_struct *tty = uart->port.info->port.tty; 439 struct tty_struct *tty = uart->port.state->port.tty;
436 int i, flg, status; 440 int i, flg, status;
437 441
438 status = UART_GET_LSR(uart); 442 status = UART_GET_LSR(uart);
@@ -525,7 +529,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
525static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id) 529static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
526{ 530{
527 struct bfin_serial_port *uart = dev_id; 531 struct bfin_serial_port *uart = dev_id;
528 struct circ_buf *xmit = &uart->port.info->xmit; 532 struct circ_buf *xmit = &uart->port.state->xmit;
529 533
530#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 534#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
531 if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) { 535 if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
@@ -961,10 +965,10 @@ static void bfin_serial_set_ldisc(struct uart_port *port)
961 int line = port->line; 965 int line = port->line;
962 unsigned short val; 966 unsigned short val;
963 967
964 if (line >= port->info->port.tty->driver->num) 968 if (line >= port->state->port.tty->driver->num)
965 return; 969 return;
966 970
967 switch (port->info->port.tty->termios->c_line) { 971 switch (port->state->port.tty->termios->c_line) {
968 case N_IRDA: 972 case N_IRDA:
969 val = UART_GET_GCTL(&bfin_serial_ports[line]); 973 val = UART_GET_GCTL(&bfin_serial_ports[line]);
970 val |= (IREN | RPOLC); 974 val |= (IREN | RPOLC);