From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Chanho Min <chanho.min@lge.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Alan Cox <alan@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Chanho Min <chanho0207@gmail.com>
Subject: Re: [PATCH] ARM: PL011: Add support for Rx DMA buffer polling.
Date: Fri, 29 Mar 2013 09:19:57 -0700 [thread overview]
Message-ID: <20130329161957.GA14717@kroah.com> (raw)
In-Reply-To: <CAOAMb1AcBprsZ1RpA3XDjUC6hAZMrbBcmvVJk7oryeMsPcJy1A@mail.gmail.com>
On Wed, Mar 27, 2013 at 06:38:11PM +0900, Chanho Min wrote:
> In DMA support, The received data is not pushed to tty until the DMA buffer
> is filled. But some megabyte rate chips such as BT expect fast response and
> data should be pushed immediately. In order to fix this issue, We suggest
> the use of the timer for polling DMA buffer.
> In our test, no data loss occurred at high-baudrate as compared with interrupt-
> driven (We tested with 3Mbps).
> We changes:
>
> - We add timer for polling. If we set poll_timer to 10, every 10ms,
> timer handler checks the residue in the dma buffer and transfer data
> to the tty. Also, last_residue is updated for the next polling.
>
> - poll_timeout is used to prevent the timer's system cost.
> If poll_timeout is set to 3000 and no data is received in 3 seconds,
> we inactivate poll timer and driver falls back to interrupt-driven.
> When data is received again in FIFO and UART irq is occurred, we switch
> back to DMA mode and start polling.
>
> - We use consistent DMA mappings to avoid from the frequent cache operation
> of the timer function for default.
>
> - pl011_dma_rx_chars is modified. the pending size is recalculated because
> data can be taken by polling.
>
> - the polling time is adjusted if dma rx poll is enabled but no rate is
> specified. Ideal polling interval to push 1 character at every interval
> is the reciprocal of 'baud rate / 10 line bits per character / 1000 ms
> per sec'. But It is very aggressive to system. Experimentally,
> '10000000 / baud' is suitable to receive dozens of characters. the poll rate
> can be specified statically by dma_rx_poll_rate of the platform data as well.
>
> Changes compared to v1:
> - Use of consistent DMA mappings.
> - Added dma_rx_poll_rate in platform data to specify the polling interval.
> - Added dma_rx_poll_timeout in platform data to specify the polling timeout.
>
> Changes compared to v2:
> - Use of consistent DMA mappings for default.
> - Added dma_rx_poll_enable in platform data to adjust the polling time
> according to the baud rate.
> - remove unnecessary lock from the polling function.
>
> Signed-off-by: Chanho Min <chanho.min@lge.com>
This patch was line-wrapped and I had to fix it up by editing it by
hand. Please fix your email client to not have this happen again.
greg k-h
next prev parent reply other threads:[~2013-03-29 16:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 9:38 Chanho Min
2013-03-29 16:19 ` Greg Kroah-Hartman [this message]
[not found] <50efad8d.84fc440a.589e.ffff9546SMTPIN_ADDED_BROKEN@mx.google.com>
2013-01-11 18:34 ` Linus Walleij
[not found] ` <50f107aa.894e420a.596a.ffffe3f6SMTPIN_ADDED_BROKEN@mx.google.com>
2013-01-14 0:04 ` Linus Walleij
2013-01-14 0:26 ` Russell King - ARM Linux
2013-01-14 6:46 ` Linus Walleij
2013-01-14 7:27 ` Chanho Min
2013-01-14 7:56 ` Linus Walleij
2013-01-14 8:41 ` Chanho Min
[not found] <006c01cdefc2$c7e1cb90$57a562b0$@min@lge.com>
2013-01-11 16:18 ` Russell King - ARM Linux
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=20130329161957.GA14717@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alan@linux.intel.com \
--cc=chanho.min@lge.com \
--cc=chanho0207@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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®