[PATCH] dmaengine: add CSR SiRFprimaII DMAC driver

Jassi Brar jassisinghbrar at gmail.com
Thu Sep 8 02:37:43 EDT 2011


On Thu, Sep 8, 2011 at 11:44 AM, Barry Song <21cnbao at gmail.com> wrote:
>> Sorry, the role of DMA_WIDTH is not clear to me yet.
>> In which case the user _must_ set {xlen > width} ?
>
> DMA_WIDTH is the size address will increase after every DMA line.
> For example:
> if xlen = 4, dma_width=8, ylen=5;
> Then DMA will run as(suppose DMA address start from 0):
> 0~3
> 8~11
> 16~19
> 24~27
> ...
Ok, so I guessed right.  2d-dma.PNG is indeed inaccurate, unless
there is some separate start-address of the 'width-window' which
you haven't mentioned.

> This feature can help us to do DMA operation to non-continuous memory
> area, for example, pick a part of a image.
That's just a small part of what the proposed api can do.

> The DMA X-length is in the 32-bit D-word boundary. This value
> specifies the number of D-words transferred
> in each line. The value should be less than or equal to the value of
> DMA width register.
>
> The DMA Y-length specifies the number of lines in DMA transfers. The
> number of the lines in DMA transfer
> is Y-length + 1.
>
> Each channel has dedicated DMA Width registers. Each DMA channel
> should not use other channel’s DMA
> width.
> To enable a correct 2-D DMA, the DMA Width register must be correctly
> set. The value of the DMA Width
> register must be greater than or equal to the X-length, otherwise, the
> data is overlapped. DMA_WIDTH
> should not be set to 0.
>
Ok, so what I said in my last post [https://lkml.org/lkml/2011/9/8/10] seems
quite accurate. Maybe you only need to additionally take care of
conversion of sizes between bytes and words.



More information about the linux-arm-kernel mailing list