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 1:26 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> [Me]
>> But it may very well be that the single request can not be
>> enabled for the PL011 for it to work properly.
>
> 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.

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

I know sometimes a programmer will get assigned to "implement
DMA for IP block <foo>", and usually they want to deliver, but
sometimes you have to come back and say "you know that
is not such a good idea".

>> You may not be able to turn this off, and in that case this
>> kind of code is the only way forward indeed.
>
> Unless there's something inbetween the PL080 and PL011 to do that.
> The peripherals themselves don't have any means of controlling this.

We have it working perfectly on U300 and Ux500 but I think
it must be thanks to some hardware modifications.

On the Ux500 it is strictly required since it is used for megabit
rate chips like Bluetooth, and we get successful DMA support
on these.

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

Then I suspect I can reproduce it with the PB11MPCore
and PL081 also given some time. I probably just did the tests
the wrong way.

Yours,
Linus Walleij


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