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.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 5c025d1190c1..266aa325569e 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -446,8 +446,7 @@ static void sci_transmit_chars(struct uart_port *port)
446/* On SH3, SCIF may read end-of-break as a space->mark char */ 446/* On SH3, SCIF may read end-of-break as a space->mark char */
447#define STEPFN(c) ({int __c=(c); (((__c-1)|(__c)) == -1); }) 447#define STEPFN(c) ({int __c=(c); (((__c-1)|(__c)) == -1); })
448 448
449static inline void sci_receive_chars(struct uart_port *port, 449static inline void sci_receive_chars(struct uart_port *port)
450 struct pt_regs *regs)
451{ 450{
452 struct sci_port *sci_port = (struct sci_port *)port; 451 struct sci_port *sci_port = (struct sci_port *)port;
453 struct tty_struct *tty = port->info->tty; 452 struct tty_struct *tty = port->info->tty;
@@ -476,7 +475,7 @@ static inline void sci_receive_chars(struct uart_port *port,
476 475
477 if (port->type == PORT_SCI) { 476 if (port->type == PORT_SCI) {
478 char c = sci_in(port, SCxRDR); 477 char c = sci_in(port, SCxRDR);
479 if (uart_handle_sysrq_char(port, c, regs) || sci_port->break_flag) 478 if (uart_handle_sysrq_char(port, c) || sci_port->break_flag)
480 count = 0; 479 count = 0;
481 else { 480 else {
482 tty_insert_flip_char(tty, c, TTY_NORMAL); 481 tty_insert_flip_char(tty, c, TTY_NORMAL);
@@ -504,7 +503,7 @@ static inline void sci_receive_chars(struct uart_port *port,
504 } 503 }
505 } 504 }
506#endif /* CONFIG_CPU_SH3 */ 505#endif /* CONFIG_CPU_SH3 */
507 if (uart_handle_sysrq_char(port, c, regs)) { 506 if (uart_handle_sysrq_char(port, c)) {
508 count--; i--; 507 count--; i--;
509 continue; 508 continue;
510 } 509 }
@@ -652,18 +651,18 @@ static inline int sci_handle_breaks(struct uart_port *port)
652 return copied; 651 return copied;
653} 652}
654 653
655static irqreturn_t sci_rx_interrupt(int irq, void *port, struct pt_regs *regs) 654static irqreturn_t sci_rx_interrupt(int irq, void *port)
656{ 655{
657 /* I think sci_receive_chars has to be called irrespective 656 /* I think sci_receive_chars has to be called irrespective
658 * of whether the I_IXOFF is set, otherwise, how is the interrupt 657 * of whether the I_IXOFF is set, otherwise, how is the interrupt
659 * to be disabled? 658 * to be disabled?
660 */ 659 */
661 sci_receive_chars(port, regs); 660 sci_receive_chars(port);
662 661
663 return IRQ_HANDLED; 662 return IRQ_HANDLED;
664} 663}
665 664
666static irqreturn_t sci_tx_interrupt(int irq, void *ptr, struct pt_regs *regs) 665static irqreturn_t sci_tx_interrupt(int irq, void *ptr)
667{ 666{
668 struct uart_port *port = ptr; 667 struct uart_port *port = ptr;
669 668
@@ -674,7 +673,7 @@ static irqreturn_t sci_tx_interrupt(int irq, void *ptr, struct pt_regs *regs)
674 return IRQ_HANDLED; 673 return IRQ_HANDLED;
675} 674}
676 675
677static irqreturn_t sci_er_interrupt(int irq, void *ptr, struct pt_regs *regs) 676static irqreturn_t sci_er_interrupt(int irq, void *ptr)
678{ 677{
679 struct uart_port *port = ptr; 678 struct uart_port *port = ptr;
680 679
@@ -696,18 +695,18 @@ static irqreturn_t sci_er_interrupt(int irq, void *ptr, struct pt_regs *regs)
696 pr_debug("scif: overrun error\n"); 695 pr_debug("scif: overrun error\n");
697 } 696 }
698#endif 697#endif
699 sci_rx_interrupt(irq, ptr, regs); 698 sci_rx_interrupt(irq, ptr);
700 } 699 }
701 700
702 sci_out(port, SCxSR, SCxSR_ERROR_CLEAR(port)); 701 sci_out(port, SCxSR, SCxSR_ERROR_CLEAR(port));
703 702
704 /* Kick the transmission */ 703 /* Kick the transmission */
705 sci_tx_interrupt(irq, ptr, regs); 704 sci_tx_interrupt(irq, ptr);
706 705
707 return IRQ_HANDLED; 706 return IRQ_HANDLED;
708} 707}
709 708
710static irqreturn_t sci_br_interrupt(int irq, void *ptr, struct pt_regs *regs) 709static irqreturn_t sci_br_interrupt(int irq, void *ptr)
711{ 710{
712 struct uart_port *port = ptr; 711 struct uart_port *port = ptr;
713 712
@@ -724,7 +723,7 @@ static irqreturn_t sci_br_interrupt(int irq, void *ptr, struct pt_regs *regs)
724 return IRQ_HANDLED; 723 return IRQ_HANDLED;
725} 724}
726 725
727static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr, struct pt_regs *regs) 726static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
728{ 727{
729 unsigned short ssr_status, scr_status; 728 unsigned short ssr_status, scr_status;
730 struct uart_port *port = ptr; 729 struct uart_port *port = ptr;
@@ -734,16 +733,16 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr, struct pt_regs *regs)
734 733
735 /* Tx Interrupt */ 734 /* Tx Interrupt */
736 if ((ssr_status & 0x0020) && (scr_status & 0x0080)) 735 if ((ssr_status & 0x0020) && (scr_status & 0x0080))
737 sci_tx_interrupt(irq, ptr, regs); 736 sci_tx_interrupt(irq, ptr);
738 /* Rx Interrupt */ 737 /* Rx Interrupt */
739 if ((ssr_status & 0x0002) && (scr_status & 0x0040)) 738 if ((ssr_status & 0x0002) && (scr_status & 0x0040))
740 sci_rx_interrupt(irq, ptr, regs); 739 sci_rx_interrupt(irq, ptr);
741 /* Error Interrupt */ 740 /* Error Interrupt */
742 if ((ssr_status & 0x0080) && (scr_status & 0x0400)) 741 if ((ssr_status & 0x0080) && (scr_status & 0x0400))
743 sci_er_interrupt(irq, ptr, regs); 742 sci_er_interrupt(irq, ptr);
744 /* Break Interrupt */ 743 /* Break Interrupt */
745 if ((ssr_status & 0x0010) && (scr_status & 0x0200)) 744 if ((ssr_status & 0x0010) && (scr_status & 0x0200))
746 sci_br_interrupt(irq, ptr, regs); 745 sci_br_interrupt(irq, ptr);
747 746
748 return IRQ_HANDLED; 747 return IRQ_HANDLED;
749} 748}
@@ -795,7 +794,7 @@ static struct notifier_block sci_nb = { &sci_notifier, NULL, 0 };
795static int sci_request_irq(struct sci_port *port) 794static int sci_request_irq(struct sci_port *port)
796{ 795{
797 int i; 796 int i;
798 irqreturn_t (*handlers[4])(int irq, void *ptr, struct pt_regs *regs) = { 797 irqreturn_t (*handlers[4])(int irq, void *ptr) = {
799 sci_er_interrupt, sci_rx_interrupt, sci_tx_interrupt, 798 sci_er_interrupt, sci_rx_interrupt, sci_tx_interrupt,
800 sci_br_interrupt, 799 sci_br_interrupt,
801 }; 800 };