lkml.org 
[lkml]   [2013]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ARM: PL011: Add support for Rx DMA buffer polling
From
On Mon, Jan 14, 2013 at 3:46 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Jan 14, 2013 at 1:26 AM, Russell King - ARM Linux
>> What you describe above is exactly the problem I see on the Versatile
>> platform with it's PL080 and PL011. I made the comment that this setup
>> can't work properly as it stands. And I don't think that setting a
>> timer which fires every jiffy count is really a solution to the problem.
>> That's an expensive way of having a per-jiffy callback for something
>> that's probably going to remain idle most of the time.
>
> OK then that's what we can expect from an unmodified PL011.
>
>> Not only that, but a 1 jiffy timeout even for slower baud rates is
>> just utterly silly.
>>
>> The point of using DMA is to move the workload off the CPU onto hardware,
>> so that the CPU can go off and do other stuff. If it's having to poll
>> it once every jiffy, then...
>
> Agreed.

I agree also. So We hope to suggest a way to reduce such cost.
Rx DMA is required for the fast baud only. PIO is sufficient for the
slow baud rate.
So this feature is optional for the specific port.
1 jiffy timeout is experimental and adjustable. Even 100ms, It will be
better than
remain in the DMA buffer. Also, the polling interval can be adjusted
according to
baud rate as Russel mentioned.

> Chanho, have you considered just leaving RX DMA undefined
> and only use DMA for TX?

No, We need RX DMA to reduce data loss rather than TX DMA.

>> The solution I came up with on Versatile was to just not enable
>> receive DMA - at all.

We just want to use this HW function even if SW support is needed.
Anyway, It was very useful for megabyte rate chips.

Thanks
Chanho


\
 
 \ /
  Last update: 2013-01-14 09:01    [W:0.060 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site