linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nandor Han <nandor.han@ge.com>
To: =Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>
Cc: Nandor Han <nandor.han@ge.com>,
	dmaengine@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH RFC 0/4] serial,dma: use DMA cyclic for IMX UART driver
Date: Thu,  9 Jun 2016 15:16:29 +0300	[thread overview]
Message-ID: <cover.1465456639.git.nandor.han@ge.com> (raw)

Update the IMX UART driver to use cyclic DMA in order
to avoid losing serial data because of DMA start latency.

Support variable data length transfers for cyclic channels in
IMX SDMA(Smart DMA) driver and, as specified in 
"Documentation/dmaengine/provider.txt" section "General Design Notes",
run the SDMA channel callback directly from the SDMA interrupt context.

Every commit message will explain the changes.

Impacted devices:
  IMX6i,IMX53 CPU:
        - clients of the IMX UART that have DMA enabled.
        - cyclic SDMA clients 
            (Note:Not able to find others than IMX UART driver)

Functionality tested by connecting the m53evk to my laptop using a
USB-serial converter and start sending, from my laptop 800 bytes
long packets at 8ms interval.

On the m53evk with interrupt load, generated by
connecting/disconnecting at 3s interval a USB HUB having
some devices connected (~4), I receive serial data in a
loop and check that no overruns are created using command:

    `watch -n1 cat /proc/tty/driver/IMX-uart`

Also done tests were I check how the data is received  when sending packets
bigger than a buffer descriptor size (1024). In my tests I have sent 4 packets
(1028, 2048, 2048, 2048) and check that 7172 bytes were received using
the command:
    `watch -n1 cat /proc/tty/driver/IMX-uart`

    Result:
        serinfo:1.0 driver revision:
        2: uart:IMX mmio:0x5000C000 irq:49 tx:0 rx:7172 RTS|CTS|DTR|DSR|CD


Nandor Han (4):
  dma: imx-sdma - reduce transfer latency for DMA cyclic clients
  dma: imx-sdma - update the residue calculation for cyclic channels
  serial: imx-serial - update UART IMX driver to use cyclic DMA
  serial: imx-serial - update RX error counters when DMA is used

 drivers/dma/imx-sdma.c   |  56 +++++++++------
 drivers/tty/serial/imx.c | 173 ++++++++++++++++++++++++++++++-----------------
 2 files changed, 144 insertions(+), 85 deletions(-)

-- 
2.8.3

             reply	other threads:[~2016-06-09 12:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 12:16 Nandor Han [this message]
2016-06-09 12:16 ` [PATCH RFC 1/4] dma: imx-sdma - reduce transfer latency for DMA cyclic clients Nandor Han
2016-06-28 14:34   ` Vinod Koul
2016-07-01 14:59     ` EXT: " Nandor Han
2016-07-02 17:27       ` Vinod Koul
2016-07-14  8:32   ` Peter Senna Tschudin
2016-06-09 12:16 ` [PATCH RFC 2/4] dma: imx-sdma - update the residue calculation for cyclic channels Nandor Han
2016-06-09 12:16 ` [PATCH RFC 3/4] serial: imx-serial - update UART IMX driver to use cyclic DMA Nandor Han
2016-06-09 12:16 ` [PATCH RFC 4/4] serial: imx-serial - update RX error counters when DMA is used Nandor Han
2016-08-08 12:38 ` [PATCH 0/4] serial,dmaengine: use DMA cyclic for IMX UART driver Nandor Han
2016-08-08 12:38   ` [PATCH 1/4] dmaengine: imx-sdma - reduce transfer latency for DMA cyclic clients Nandor Han
2016-08-08 12:38   ` [PATCH 2/4] dmaengine: imx-sdma - update the residue calculation for cyclic channels Nandor Han
2016-08-08 12:38   ` [PATCH 3/4] serial: imx-serial - update UART IMX driver to use cyclic DMA Nandor Han
2016-08-08 12:38   ` [PATCH 4/4] serial: imx-serial - update RX error counters when DMA is used Nandor Han

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=cover.1465456639.git.nandor.han@ge.com \
    --to=nandor.han@ge.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).