aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sh-sci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r--drivers/tty/serial/sh-sci.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index e032963989fc..5b50c792ad5f 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -858,7 +858,7 @@ static int sci_handle_fifo_overrun(struct uart_port *port)
858 tty_insert_flip_char(tport, 0, TTY_OVERRUN); 858 tty_insert_flip_char(tport, 0, TTY_OVERRUN);
859 tty_flip_buffer_push(tport); 859 tty_flip_buffer_push(tport);
860 860
861 dev_notice(port->dev, "overrun error\n"); 861 dev_dbg(port->dev, "overrun error\n");
862 copied++; 862 copied++;
863 } 863 }
864 864
@@ -997,12 +997,15 @@ static inline unsigned long port_rx_irq_mask(struct uart_port *port)
997static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) 997static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
998{ 998{
999 unsigned short ssr_status, scr_status, err_enabled; 999 unsigned short ssr_status, scr_status, err_enabled;
1000 unsigned short slr_status = 0;
1000 struct uart_port *port = ptr; 1001 struct uart_port *port = ptr;
1001 struct sci_port *s = to_sci_port(port); 1002 struct sci_port *s = to_sci_port(port);
1002 irqreturn_t ret = IRQ_NONE; 1003 irqreturn_t ret = IRQ_NONE;
1003 1004
1004 ssr_status = serial_port_in(port, SCxSR); 1005 ssr_status = serial_port_in(port, SCxSR);
1005 scr_status = serial_port_in(port, SCSCR); 1006 scr_status = serial_port_in(port, SCSCR);
1007 if (port->type == PORT_SCIF || port->type == PORT_HSCIF)
1008 slr_status = serial_port_in(port, SCLSR);
1006 err_enabled = scr_status & port_rx_irq_mask(port); 1009 err_enabled = scr_status & port_rx_irq_mask(port);
1007 1010
1008 /* Tx Interrupt */ 1011 /* Tx Interrupt */
@@ -1015,8 +1018,11 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
1015 * DR flags 1018 * DR flags
1016 */ 1019 */
1017 if (((ssr_status & SCxSR_RDxF(port)) || s->chan_rx) && 1020 if (((ssr_status & SCxSR_RDxF(port)) || s->chan_rx) &&
1018 (scr_status & SCSCR_RIE)) 1021 (scr_status & SCSCR_RIE)) {
1022 if (port->type == PORT_SCIF || port->type == PORT_HSCIF)
1023 sci_handle_fifo_overrun(port);
1019 ret = sci_rx_interrupt(irq, ptr); 1024 ret = sci_rx_interrupt(irq, ptr);
1025 }
1020 1026
1021 /* Error Interrupt */ 1027 /* Error Interrupt */
1022 if ((ssr_status & SCxSR_ERRORS(port)) && err_enabled) 1028 if ((ssr_status & SCxSR_ERRORS(port)) && err_enabled)
@@ -1026,6 +1032,12 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
1026 if ((ssr_status & SCxSR_BRK(port)) && err_enabled) 1032 if ((ssr_status & SCxSR_BRK(port)) && err_enabled)
1027 ret = sci_br_interrupt(irq, ptr); 1033 ret = sci_br_interrupt(irq, ptr);
1028 1034
1035 /* Overrun Interrupt */
1036 if (port->type == PORT_SCIF || port->type == PORT_HSCIF) {
1037 if (slr_status & 0x01)
1038 sci_handle_fifo_overrun(port);
1039 }
1040
1029 return ret; 1041 return ret;
1030} 1042}
1031 1043
@@ -2605,7 +2617,7 @@ static int sci_probe(struct platform_device *dev)
2605 return 0; 2617 return 0;
2606} 2618}
2607 2619
2608static int sci_suspend(struct device *dev) 2620static __maybe_unused int sci_suspend(struct device *dev)
2609{ 2621{
2610 struct sci_port *sport = dev_get_drvdata(dev); 2622 struct sci_port *sport = dev_get_drvdata(dev);
2611 2623
@@ -2615,7 +2627,7 @@ static int sci_suspend(struct device *dev)
2615 return 0; 2627 return 0;
2616} 2628}
2617 2629
2618static int sci_resume(struct device *dev) 2630static __maybe_unused int sci_resume(struct device *dev)
2619{ 2631{
2620 struct sci_port *sport = dev_get_drvdata(dev); 2632 struct sci_port *sport = dev_get_drvdata(dev);
2621 2633
@@ -2625,10 +2637,7 @@ static int sci_resume(struct device *dev)
2625 return 0; 2637 return 0;
2626} 2638}
2627 2639
2628static const struct dev_pm_ops sci_dev_pm_ops = { 2640static SIMPLE_DEV_PM_OPS(sci_dev_pm_ops, sci_suspend, sci_resume);
2629 .suspend = sci_suspend,
2630 .resume = sci_resume,
2631};
2632 2641
2633static struct platform_driver sci_driver = { 2642static struct platform_driver sci_driver = {
2634 .probe = sci_probe, 2643 .probe = sci_probe,