Re: Q: using DMA with OMAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 23, 2016 at 11:05 AM, Peter Ujfalusi <peter.ujfalusi@xxxxxx> wrote:
> On 08/22/16 13:49, Ran Shalit wrote:
>>>> I try to use dmaengine (using dart board), with dmatest.ko,
>>>
>>> With dmatest you can only test MEM_TO_MEM type of transfers, like memcpy, XOR,
>>> etc.
>>>
>>
>> I use omap4 connected to fpga. fpga implements fifo which cpu need to
>> read/write from/to (iowrite16).
>> I think it should be "memory to memory".
>> From my understanding device to/from memory only required when device
>> read/write from RAM while in this case we use fpga memory (which is
>> mapped to cpu)
>> Is that correct ? Can we use memory to memory ?
>
> If the fpga memory is mapped, then memcpy should be fine, if you have only one
> address to read/write then memcpy will not work. You will need slave DMA. For
> that to work you will need DMA request from the fpga.
>
>>>> but seems that nothing happens because /sys/class/dma is empty.
>>>
>>> How can your board even boot up w/o dma?
>>>
>>
>> On doing "ls /sys/class/dma" I get no list of channels.
>> I am not sure what it means.
>>
>>
>>>> Is there a way to register the dma channels (using dart board file
>>>> probably) so that they appear ?
>>>
>>> OMAP4 _needs_ dmaengine to be available in order to boot, do you have DMA_OMAP
>>> enabled in your kernel? What is the kernel versiuon you are using?
>>>
>>
>> The config has no DMA_OMAP (but has DMAENGINE enabled)
>> The kernel version is 3.4.0
>> I wander how it boot without dma. Maybe dma is missing from /sys/config/dma ?
>>
>> I am also not sure where is the dma driver for omap (sdma) in this kernel.
>> Should 3.4.0 omap dma driver support memory-to-memory , and 16bits
>> transactions (this is required for the fpga) ?
>
> The sDMA dmaengine driver was introduced with 3.6, the memcpy support is
> coming in at 4.2.
> In 3.4 you only have the legacy omap-dma support. This explains why the
> /sys/class/dma/ is empty for you.
>

Peter,
Thank you very much.

It seems that I can't upgrade the kernel at this point of development.
So, I will have to do it with legacy API (since I can't updared) using
omap-dma.c , memcpy transfer , 16-bits.
I think it is possible, Right ?
I see there is also example (mcbsp.c) for using legacy in:
ftp://ftp.oregonstate.edu/.2/nslu2/sources/git/git.openmoko.org.git.kernel.git/arch/arm/plat-omap/mcbsp.c
As I understand, the transfer word length is set with
omap_set_dma_transfer_params(),  used with OMAP_DMA_DATA_TYPE_S16 for
16-bits with .

Another last thing:
Do we need to confure dma channels in board file (I can't see any
reference to dma) ?

Thank you,
Ran

>>

>>>>
>>>>
>>>> Regards,
>>>> Ran
>>>>
>>>>
>>>>>>
>>>>>>>
>>>>>>>> 2.Is there any example which shows how to use DMA (which shall call
>>>>>>>> the edma, and shall result in triggering a dma trsnaction in OMAP) ?
>>>>>>>
>>>>>>> git grep dmaengine_prep_dma_sg
>>>>>>> or
>>>>>>> git grep dmaengine_terminate_all
>>>>>>>
>>>>>>> will show you the drivers using dmaengine.
>>>>>>>
>>>>>>> --
>>>>>>> Péter
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Péter
>>>
>>>
>>> --
>>> Péter
>
>
> --
> Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux