Re: Q: using DMA with OMAP

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

 



On Wed, Aug 24, 2016 at 9:58 AM, Peter Ujfalusi <peter.ujfalusi@xxxxxx> wrote:
> On 08/23/16 13:12, Ran Shalit wrote:
>>> 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 ?
>
> Sure, if there is no dmaengine for sDMA, the legacy API is the only way to use
> sDMA. It is just a matter of how you configure the omap-dma, the API allows
> pretty much to use all features of sDMA.
>
>> 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
>
> Hrm, this is more like 2.6.29-ish code...
>
>> 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 .
>
> McASP is using hw trigger, not sw trigger. It is not memcpy at all. Not sure
> if 2.6.29 had any memcpy users of sDMA.
>
>> Another last thing:
>> Do we need to confure dma channels in board file (I can't see any
>> reference to dma) ?
>
> This is only needed if the device have DMA request. In that case you want to
> have the hw request number as DMA resource on the device. But for memcpy you
> should not have hw request number as memcpy is sw triggered.
>

Dear Peter,

If I may please ask one more on dma issue, with legacy api:

1. How do we choose word length 16 bits, is it by using
OMAP_DMA_DATA_TYPE_S16 with:
omap_set_dma_transfer_params(tx->dma_ch, OMAP_DMA_DATA_TYPE_S16, ...)

2. I did not understand how to specify memoty-to-memory (sw trigger).
Is sw trigger same as burst mode ?
     When should we use burst mode ? (I did not find documentation for
klegacy api, so I'm not sure, it also contain burst length which I am
not sure which value I should use in)
     Do you think /drivers/media/video/omap/omap_vout_frfb.c can be
suited as example for memory-to-memory ?

Regards,
Ran

>
>> 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
>
>
> --
> 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