diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2013-05-14 11:06:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-20 14:53:46 -0400 |
commit | f1f836e4209eb904008efeb5faa69839b24fab5b (patch) | |
tree | 59224b3e9451e9968f4de5f2e36f24d40f35a5be /drivers/tty | |
parent | ea33640a933e208301fea4fe7cbc6cc288e32cc6 (diff) |
serial: imx: Add Rx Fifo overrun error message
This patch enables the overrun error (ORE) interrupt and increases the
counter in case of overrun.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/imx.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 147c9e193595..72bc1dbcd055 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -449,6 +449,13 @@ static void imx_start_tx(struct uart_port *port) | |||
449 | temp &= ~(UCR1_RRDYEN); | 449 | temp &= ~(UCR1_RRDYEN); |
450 | writel(temp, sport->port.membase + UCR1); | 450 | writel(temp, sport->port.membase + UCR1); |
451 | } | 451 | } |
452 | /* Clear any pending ORE flag before enabling interrupt */ | ||
453 | temp = readl(sport->port.membase + USR2); | ||
454 | writel(temp | USR2_ORE, sport->port.membase + USR2); | ||
455 | |||
456 | temp = readl(sport->port.membase + UCR4); | ||
457 | temp |= UCR4_OREN; | ||
458 | writel(temp, sport->port.membase + UCR4); | ||
452 | 459 | ||
453 | temp = readl(sport->port.membase + UCR1); | 460 | temp = readl(sport->port.membase + UCR1); |
454 | writel(temp | UCR1_TXMPTYEN, sport->port.membase + UCR1); | 461 | writel(temp | UCR1_TXMPTYEN, sport->port.membase + UCR1); |
@@ -582,6 +589,7 @@ static irqreturn_t imx_int(int irq, void *dev_id) | |||
582 | { | 589 | { |
583 | struct imx_port *sport = dev_id; | 590 | struct imx_port *sport = dev_id; |
584 | unsigned int sts; | 591 | unsigned int sts; |
592 | unsigned int sts2; | ||
585 | 593 | ||
586 | sts = readl(sport->port.membase + USR1); | 594 | sts = readl(sport->port.membase + USR1); |
587 | 595 | ||
@@ -598,6 +606,13 @@ static irqreturn_t imx_int(int irq, void *dev_id) | |||
598 | if (sts & USR1_AWAKE) | 606 | if (sts & USR1_AWAKE) |
599 | writel(USR1_AWAKE, sport->port.membase + USR1); | 607 | writel(USR1_AWAKE, sport->port.membase + USR1); |
600 | 608 | ||
609 | sts2 = readl(sport->port.membase + USR2); | ||
610 | if (sts2 & USR2_ORE) { | ||
611 | dev_err(sport->port.dev, "Rx FIFO overrun\n"); | ||
612 | sport->port.icount.overrun++; | ||
613 | writel(sts2 | USR2_ORE, sport->port.membase + USR2); | ||
614 | } | ||
615 | |||
601 | return IRQ_HANDLED; | 616 | return IRQ_HANDLED; |
602 | } | 617 | } |
603 | 618 | ||