From: troy.kisky@boundarydevices.com (Troy Kisky)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] tty: serial: imx: remove dead code imx_dma_rxint
Date: Fri, 20 Oct 2017 14:20:20 -0700 [thread overview]
Message-ID: <20171020212021.13065-2-troy.kisky@boundarydevices.com> (raw)
In-Reply-To: <20171020212021.13065-1-troy.kisky@boundarydevices.com>
Since commit 4dec2f119e86 ("imx-serial: RX DMA startup latency")
the interrupt routine no longer will start rx dma.
imx_dma_rxint no longer needs to be called to try and start dma.
It won't start dma because dma_is_rxing is
already true meaning dma is already started.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
v2: split into 2 patches
---
drivers/tty/serial/imx.c | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index bf47b15df2e8..15b0ecb4cf60 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -732,29 +732,6 @@ static void imx_disable_rx_int(struct imx_port *sport)
}
static void clear_rx_errors(struct imx_port *sport);
-static int start_rx_dma(struct imx_port *sport);
-/*
- * If the RXFIFO is filled with some data, and then we
- * arise a DMA operation to receive them.
- */
-static void imx_dma_rxint(struct imx_port *sport)
-{
- unsigned long temp;
- unsigned long flags;
-
- spin_lock_irqsave(&sport->port.lock, flags);
-
- temp = readl(sport->port.membase + USR2);
- if ((temp & USR2_RDR) && !sport->dma_is_rxing) {
-
- imx_disable_rx_int(sport);
-
- /* tell the DMA to receive the data. */
- start_rx_dma(sport);
- }
-
- spin_unlock_irqrestore(&sport->port.lock, flags);
-}
/*
* We have a modem side uart, so the meanings of RTS and CTS are inverted.
@@ -816,11 +793,8 @@ static irqreturn_t imx_int(int irq, void *dev_id)
sts = readl(sport->port.membase + USR1);
sts2 = readl(sport->port.membase + USR2);
- if (sts & (USR1_RRDY | USR1_AGTIM)) {
- if (sport->dma_is_enabled)
- imx_dma_rxint(sport);
- else
- imx_rxint(irq, dev_id);
+ if (!sport->dma_is_enabled && (sts & (USR1_RRDY | USR1_AGTIM))) {
+ imx_rxint(irq, dev_id);
ret = IRQ_HANDLED;
}
--
2.11.0
next prev parent reply other threads:[~2017-10-20 21:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 21:20 [PATCH v2 1/3] tty: serial: imx: disable ageing timer interrupt if dma in use Troy Kisky
2017-10-20 21:20 ` Troy Kisky [this message]
2017-10-20 21:20 ` [PATCH v2 3/3] tty: serial: imx: remove imx_disable_rx_int Troy Kisky
2017-10-20 21:25 ` Troy Kisky
2017-10-22 18:49 ` Uwe Kleine-König
2017-10-23 8:26 ` Juergen Borleis
2017-11-04 11:39 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171020212021.13065-2-troy.kisky@boundarydevices.com \
--to=troy.kisky@boundarydevices.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox