This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM365 IPNC porting on Linux 2.6.32+DVSDK3.10 : DMA driver questions.

Hi TI staff and all,

We are trying to migrate our application based on IPNC which presently worked under lsp2.10 and dvsdk2.

I confirm there are a lot of issues raised either for Code sourcery libraries, dvsdk libraries, codec engine configuration scripts, and finally drivers which need to be modified on the ipnc. Drivers to change were confirmed on the following page:

(from web page http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.01_Linux_Installation_User_Guide#Baseport_SoC.2C_EVM_support) :

I print the dma part for following questions

EDMA

DaVinci PSP 03.01 release re-designed the EDMA driver (set of kernel APIs for use by other device drivers) by cleaning up unused structures and APIs and also renaming almost all APIs.

  • davinci_request_dma changed to edma_alloc_channel. The new API does not require dev_name, channel and tcc to be passed. The allocated channel number is returned back to the caller. TCC and PaRAM allocation is handled by other APIs.
  • davinci_set_dma_src_params changed to edma_set_src; davinci_set_dma_sest_params changed to edma_set_dest
  • davinci_set_dma_src_index changed to edma_set_src_index; davinci_set_dma_dest_index changed to edma_set_dest_index
  • davinci_set_dma_transfer_params changed to edma_set_transfer_params
  • davinci_get_dma_params has been changed to edma_read_slot. davinci_set_dma_params has been changed to edma_write_slot. The argument should be "struct edmacc_param" (changed from struct paramentry_descriptor). TCC can be set using edma_write_slot and setting the TCC in the edma_param structure. Currently one-to-one mapping (of TCC to the channel) is allowed in the EDMA in the driver.
  • davinci_start_dma changed to edma_start; davinci_stop_dma changed to edma_stop
  • davinci_dma_link_lch changed to edma_link
  • New APIs added to allocate/free PaRAM entries - edma_alloc_slot and edma_free_slot. If PaRAM allocation API is not called the driver assumes one-to-one mapping of PaRAM slots
  • For davinci_free_dma, the new EDMA driver expects to call edma_clean_channel, edma_free_slot and then edma_free_channel

 

for main line ideas. But not on the details.

I have begun the dma changes inside the code. and naturally it raised some questions when dealing with dev_dma.c,  dev_dmaCopyFill.c and dev_dmaDemux.c

1- Some above functions have their input argument changed from channel to slot. As it is not the same i wanted to know how to pass from the channel id to the slot number so that I can pass it to my function ?

2- I do not find a place to set the Transfer completion code (the tcc variable) which is no more present in the code. Where can I precise the TCC as it is said that : "TCC and PaRAM allocation is handled by other APIs.". I see for PaRaM but not for tcc.

Thanks in advance for your answers