From: Paul Mundt
Date: Tue Jan 25 2011 - 02:15:18 EST
On Mon, Jan 24, 2011 at 04:04:57PM -0700, mahdi hamzeh wrote:
> I am working on a research project for which I should be able to
> transfer data from memory to memory using DMA. I am working on a x86
> machine but I want my code to be architecture independent as much as
> possible. Please?accept?my?apology?if my question is too basic to be
> asked from this mailing list. Here is my problem:
> I?used "struct dma_chan" to define a channel structure but when I use
> "dma_request_channel" function to get a DMA channel, with all
> different possible masks including?DMA_MEMCPY,?DMA_PRIVATE,....
> anything, the function returns always NULL. This function is defined
> in "dmaengine.h".?I also tried a low level function to see dma channel
> availability?and "request_dma" function defined in "dma.h" works
> Any comment, help, document, program, reference anything that helps me
> to create a simple DMA transaction would really be appreciated.
> PS: There is a test program called dmatest.c is provided in the linux
> kernel files. I tried to get it compiled but I could not since the
> functions and structures used in this file has been changed in the
> kernel header files.
I'm not sure how you selected the sh list as the best forum for this
inquiry (I assume it's because Guennadi has been doing a lot of dmaengine
driver work recently), but this is really something that's better suited
for l-k directly, with Dan CC'ed (as I've done here).
If you're looking for preliminary getting started information, then your
best bet is Documentation/crypto/async-tx-api.txt, as referenced in the
The dmatest driver of course also provides you with some examples of how
to plug in to the API. In any event, I'm able to compile dmatest without
any difficulty, so I'm not sure what bitrot you are seeing, perhaps it's
something related to the driver you are using? You'll have to provide the
relevant bits from your .config or the errors you're seeing before anyone
will be able to point you in the right direction here.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/