From: Martyn Welch <martyn.welch@collabora.co.uk>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nandor Han <nandor.han@ge.com>,
Romain Perier <romain.perier@collabora.com>,
linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, u.kleine-koenig@pengutronix.de,
Fabio Estevam <fabio.estevam@nxp.com>,
Martyn Welch <martyn.welch@collabora.co.uk>
Subject: [PATCH v3 1/6] serial: imx: remove CTSC and CTS handling from imx_disable_dma
Date: Thu, 21 Sep 2017 17:18:12 +0100 [thread overview]
Message-ID: <1506010697-22114-2-git-send-email-martyn.welch@collabora.co.uk> (raw)
In-Reply-To: <1506010697-22114-1-git-send-email-martyn.welch@collabora.co.uk>
From: Nandor Han <nandor.han@ge.com>
The CTSC and CTS bits affect operation of the CTS/RTS hardware flow
control signal (depending on whether the device is in DCE or DTE mode) and
are not related to DMA. When in RS-232 mode, the driver is using the
automatic CTSC control based on a rxFIFO fill level unless the state of
the CTS signal is explictly set via an ioctl call.
Previous improvements to the imx serial driver have resulted on
imx_disable_dma() only being called on shutdown, by which point the
serial core has already correctly deasserted CTS.
Testing shows that without this handling in imx_disable_dma() the CTS
signal state is set correctly when the device is open and TIOCM_RTS is
set/cleared via the TIOCMGET ioctl. The CTS signal is also correctly
deasserted when the device file is closed.
When in RS-485 mode, the driver uses the CTS signal very differently and
appears to control it via calls to imx_port_rts_active() and
imx_port_rts_inactive().
This configuration of the CTSC and CTS bits are therefore not needed.
Signed-off-by: Nandor Han <nandor.han@ge.com>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
---
drivers/tty/serial/imx.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index fe368a4..d90dae3 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1225,11 +1225,6 @@ static void imx_disable_dma(struct imx_port *sport)
temp &= ~(UCR1_RDMAEN | UCR1_TDMAEN | UCR1_ATDMAEN);
writel(temp, sport->port.membase + UCR1);
- /* clear UCR2 */
- temp = readl(sport->port.membase + UCR2);
- temp &= ~(UCR2_CTSC | UCR2_CTS | UCR2_ATEN);
- writel(temp, sport->port.membase + UCR2);
-
imx_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
sport->dma_is_enabled = 0;
--
1.8.3.1
next prev parent reply other threads:[~2017-09-21 16:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 16:18 [PATCH v3 0/6] serial: imx: various improvements Martyn Welch
2017-09-21 16:18 ` Martyn Welch [this message]
2017-09-21 18:20 ` [PATCH v3 1/6] serial: imx: remove CTSC and CTS handling from imx_disable_dma Uwe Kleine-König
2017-09-21 19:12 ` Martyn Welch
2017-09-21 16:18 ` [PATCH v3 2/6] serial: imx: only set dma_is_rxing when DMA starts Martyn Welch
2017-09-21 18:15 ` Uwe Kleine-König
2017-09-21 16:18 ` [PATCH v3 3/6] serial: imx: Simplify DMA disablement Martyn Welch
2017-09-21 16:18 ` [PATCH v3 4/6] serial: imx: unmap sg buffers when DMA channel is released Martyn Welch
2017-09-21 18:25 ` Uwe Kleine-König
2017-09-21 16:18 ` [PATCH v3 5/6] serial: imx: update the stop rx,tx procedures Martyn Welch
2017-09-21 18:28 ` Uwe Kleine-König
2017-09-21 16:18 ` [PATCH v3 6/6] serial: imx: Fix imx_shutdown procedure Martyn Welch
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=1506010697-22114-2-git-send-email-martyn.welch@collabora.co.uk \
--to=martyn.welch@collabora.co.uk \
--cc=fabio.estevam@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nandor.han@ge.com \
--cc=romain.perier@collabora.com \
--cc=u.kleine-koenig@pengutronix.de \
/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
all inboxes | Powered by JetHome®