[PATCH 13/18] dmaengine/amba-pl08x: Align lli_len to max(src.width, dst.width)

viresh kumar viresh.linux at gmail.com
Fri Jul 29 11:39:27 EDT 2011

On 7/29/11, Koul, Vinod <vinod.koul at intel.com> wrote:
> On Fri, 2011-07-29 at 16:19 +0530, Viresh Kumar wrote:
>> Currently lli_len is aligned to min of two widths, which looks to be
>> incorrect.
>> Instead it should be aligned to max of both widths.
> hmmm, not sure I follow you...
> In previous patch you said
> "max_bytes_per_lli = bd.srcbus.buswidth *
> This is confirmed by ARM support guys."
> So why should lli_len be related to max of both widths?

Sorry if my commit log wasn't clear enough.
Actually there is a field in ctrl reg of channel: transfer_size (it is
max 4095),

total data to be transferred = srcwidth * value programmed in transfer_size.

Now, suppose we have to transfer 98 bytes with src width = HALF WORD
and dest width = WORD

then value to be programmed in transfer_size is 98 / 2 = 49

Now on the destination side, transfers will be word by word and so
after 24 transfers on dest and 48 on src, 96 bytes would be

But for the last two bytes, we can read two bytes from src, but can't
transfer them to dest. As its width was 4.

That's why we need to have lli_len to be related to max of both widths?


More information about the linux-arm-kernel mailing list