Hi Yassin,

On Wed, Mar 09, 2016 at 05:27:52PM -0800, Yassin Jaffer wrote:
> 
> Hi everyone
> 
> I'm working on the CSI driver.

Great, it was on my TODO-list :)

> I failed to understand ( lack of documentation) which DMA is used to
> transfer from the CSI. I can only find a reference in the bsp
> driver for the DRAM
> 
>     CPU_DRAM_PADDR_ORG = 0x40000000 
>     HW_DMA_OFFSET= 0x00000000
> 
>     dma_addr_t addr_org = videobuf_to_dma_contig(vb_buf) - 
> CPU_DRAM_PADDR_ORG + HW_DMA_OFFSET; 
> 
> And in the current sunxi 3.4
> 
>     addr_org = videobuf_to_dma_contig((struct videobuf_buffer *)buf);
>     if( (addr_org&0x40000000)!=0 )
>     {
>         addr_org-=0x40000000;
>         csi_dbg(3,"csi recal mem_addr=%p\n",addr_org);
>     }
> 
> 
> There is also a reference to the DMA in os_mem_alloc which is used by the 
> ISP front end.
>         mem_man->dma_addr = mem_man->phy_addr + HW_DMA_OFFSET- 
> CPU_DRAM_PADDR_ORG; 

It has its own DMA controller. You just have to feed it with a
DMA-capable buffer's physical address in the FIFO Buffer registers,
and it should just work.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Digital signature

Reply via email to