aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/imx.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/imx.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/imx.c')
-rw-r--r--drivers/serial/imx.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 7485afd0df4c..18130f11238e 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -224,7 +224,7 @@ static void imx_mctrl_check(struct imx_port *sport)
224 if (changed & TIOCM_CTS) 224 if (changed & TIOCM_CTS)
225 uart_handle_cts_change(&sport->port, status & TIOCM_CTS); 225 uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
226 226
227 wake_up_interruptible(&sport->port.info->delta_msr_wait); 227 wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
228} 228}
229 229
230/* 230/*
@@ -236,7 +236,7 @@ static void imx_timeout(unsigned long data)
236 struct imx_port *sport = (struct imx_port *)data; 236 struct imx_port *sport = (struct imx_port *)data;
237 unsigned long flags; 237 unsigned long flags;
238 238
239 if (sport->port.info) { 239 if (sport->port.state) {
240 spin_lock_irqsave(&sport->port.lock, flags); 240 spin_lock_irqsave(&sport->port.lock, flags);
241 imx_mctrl_check(sport); 241 imx_mctrl_check(sport);
242 spin_unlock_irqrestore(&sport->port.lock, flags); 242 spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -323,7 +323,7 @@ static void imx_enable_ms(struct uart_port *port)
323 323
324static inline void imx_transmit_buffer(struct imx_port *sport) 324static inline void imx_transmit_buffer(struct imx_port *sport)
325{ 325{
326 struct circ_buf *xmit = &sport->port.info->xmit; 326 struct circ_buf *xmit = &sport->port.state->xmit;
327 327
328 while (!(readl(sport->port.membase + UTS) & UTS_TXFULL)) { 328 while (!(readl(sport->port.membase + UTS) & UTS_TXFULL)) {
329 /* send xmit->buf[xmit->tail] 329 /* send xmit->buf[xmit->tail]
@@ -388,7 +388,7 @@ static irqreturn_t imx_rtsint(int irq, void *dev_id)
388 388
389 writel(USR1_RTSD, sport->port.membase + USR1); 389 writel(USR1_RTSD, sport->port.membase + USR1);
390 uart_handle_cts_change(&sport->port, !!val); 390 uart_handle_cts_change(&sport->port, !!val);
391 wake_up_interruptible(&sport->port.info->delta_msr_wait); 391 wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
392 392
393 spin_unlock_irqrestore(&sport->port.lock, flags); 393 spin_unlock_irqrestore(&sport->port.lock, flags);
394 return IRQ_HANDLED; 394 return IRQ_HANDLED;
@@ -397,7 +397,7 @@ static irqreturn_t imx_rtsint(int irq, void *dev_id)
397static irqreturn_t imx_txint(int irq, void *dev_id) 397static irqreturn_t imx_txint(int irq, void *dev_id)
398{ 398{
399 struct imx_port *sport = dev_id; 399 struct imx_port *sport = dev_id;
400 struct circ_buf *xmit = &sport->port.info->xmit; 400 struct circ_buf *xmit = &sport->port.state->xmit;
401 unsigned long flags; 401 unsigned long flags;
402 402
403 spin_lock_irqsave(&sport->port.lock,flags); 403 spin_lock_irqsave(&sport->port.lock,flags);
@@ -427,7 +427,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
427{ 427{
428 struct imx_port *sport = dev_id; 428 struct imx_port *sport = dev_id;
429 unsigned int rx,flg,ignored = 0; 429 unsigned int rx,flg,ignored = 0;
430 struct tty_struct *tty = sport->port.info->port.tty; 430 struct tty_struct *tty = sport->port.state->port.tty;
431 unsigned long flags, temp; 431 unsigned long flags, temp;
432 432
433 spin_lock_irqsave(&sport->port.lock,flags); 433 spin_lock_irqsave(&sport->port.lock,flags);
@@ -900,11 +900,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
900 rational_best_approximation(16 * div * baud, sport->port.uartclk, 900 rational_best_approximation(16 * div * baud, sport->port.uartclk,
901 1 << 16, 1 << 16, &num, &denom); 901 1 << 16, 1 << 16, &num, &denom);
902 902
903 if (port->info && port->info->port.tty) { 903 if (port->state && port->state->port.tty) {
904 tdiv64 = sport->port.uartclk; 904 tdiv64 = sport->port.uartclk;
905 tdiv64 *= num; 905 tdiv64 *= num;
906 do_div(tdiv64, denom * 16 * div); 906 do_div(tdiv64, denom * 16 * div);
907 tty_encode_baud_rate(sport->port.info->port.tty, 907 tty_encode_baud_rate(sport->port.state->port.tty,
908 (speed_t)tdiv64, (speed_t)tdiv64); 908 (speed_t)tdiv64, (speed_t)tdiv64);
909 } 909 }
910 910