aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sh-sci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r--drivers/serial/sh-sci.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 8e2feb563347..85119fb7cb50 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -272,7 +272,8 @@ static inline void sci_init_pins(struct uart_port *port, unsigned int cflag)
272 __raw_writew(data, PSCR); 272 __raw_writew(data, PSCR);
273 } 273 }
274} 274}
275#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \ 275#elif defined(CONFIG_CPU_SUBTYPE_SH7757) || \
276 defined(CONFIG_CPU_SUBTYPE_SH7763) || \
276 defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 277 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
277 defined(CONFIG_CPU_SUBTYPE_SH7785) || \ 278 defined(CONFIG_CPU_SUBTYPE_SH7785) || \
278 defined(CONFIG_CPU_SUBTYPE_SH7786) || \ 279 defined(CONFIG_CPU_SUBTYPE_SH7786) || \
@@ -360,7 +361,7 @@ static inline int sci_rxroom(struct uart_port *port)
360 361
361static void sci_transmit_chars(struct uart_port *port) 362static void sci_transmit_chars(struct uart_port *port)
362{ 363{
363 struct circ_buf *xmit = &port->info->xmit; 364 struct circ_buf *xmit = &port->state->xmit;
364 unsigned int stopped = uart_tx_stopped(port); 365 unsigned int stopped = uart_tx_stopped(port);
365 unsigned short status; 366 unsigned short status;
366 unsigned short ctrl; 367 unsigned short ctrl;
@@ -425,7 +426,7 @@ static void sci_transmit_chars(struct uart_port *port)
425static inline void sci_receive_chars(struct uart_port *port) 426static inline void sci_receive_chars(struct uart_port *port)
426{ 427{
427 struct sci_port *sci_port = to_sci_port(port); 428 struct sci_port *sci_port = to_sci_port(port);
428 struct tty_struct *tty = port->info->port.tty; 429 struct tty_struct *tty = port->state->port.tty;
429 int i, count, copied = 0; 430 int i, count, copied = 0;
430 unsigned short status; 431 unsigned short status;
431 unsigned char flag; 432 unsigned char flag;
@@ -545,7 +546,7 @@ static inline int sci_handle_errors(struct uart_port *port)
545{ 546{
546 int copied = 0; 547 int copied = 0;
547 unsigned short status = sci_in(port, SCxSR); 548 unsigned short status = sci_in(port, SCxSR);
548 struct tty_struct *tty = port->info->port.tty; 549 struct tty_struct *tty = port->state->port.tty;
549 550
550 if (status & SCxSR_ORER(port)) { 551 if (status & SCxSR_ORER(port)) {
551 /* overrun error */ 552 /* overrun error */
@@ -599,7 +600,7 @@ static inline int sci_handle_errors(struct uart_port *port)
599 600
600static inline int sci_handle_fifo_overrun(struct uart_port *port) 601static inline int sci_handle_fifo_overrun(struct uart_port *port)
601{ 602{
602 struct tty_struct *tty = port->info->port.tty; 603 struct tty_struct *tty = port->state->port.tty;
603 int copied = 0; 604 int copied = 0;
604 605
605 if (port->type != PORT_SCIF) 606 if (port->type != PORT_SCIF)
@@ -622,7 +623,7 @@ static inline int sci_handle_breaks(struct uart_port *port)
622{ 623{
623 int copied = 0; 624 int copied = 0;
624 unsigned short status = sci_in(port, SCxSR); 625 unsigned short status = sci_in(port, SCxSR);
625 struct tty_struct *tty = port->info->port.tty; 626 struct tty_struct *tty = port->state->port.tty;
626 struct sci_port *s = to_sci_port(port); 627 struct sci_port *s = to_sci_port(port);
627 628
628 if (uart_handle_break(port)) 629 if (uart_handle_break(port))
@@ -662,10 +663,11 @@ static irqreturn_t sci_rx_interrupt(int irq, void *port)
662static irqreturn_t sci_tx_interrupt(int irq, void *ptr) 663static irqreturn_t sci_tx_interrupt(int irq, void *ptr)
663{ 664{
664 struct uart_port *port = ptr; 665 struct uart_port *port = ptr;
666 unsigned long flags;
665 667
666 spin_lock_irq(&port->lock); 668 spin_lock_irqsave(&port->lock, flags);
667 sci_transmit_chars(port); 669 sci_transmit_chars(port);
668 spin_unlock_irq(&port->lock); 670 spin_unlock_irqrestore(&port->lock, flags);
669 671
670 return IRQ_HANDLED; 672 return IRQ_HANDLED;
671} 673}