EMIF接口是调试好的,但是目前我想提高速度,所以使用EDMA控制EMIF接口,EMIF接口连接在FPGA,通过FPGA观察,EDMA控制EMIF没有读或写任何数据,我的代码如下:
FpgaParam->dma_ch = edma_alloc_channel(EDMA_CHANNEL_ANY,edma_emif_callback,NULL, EVENTQ_DEFAULT);
acnt=256;
bcnt=1;
ccnt=1;
src_port = (Uint32)(info->pdata->datares_phy);//0x44000000
src_bidx = 0;
src_cidx = 0;
dst_port = (Uint32)(info->pdata->databuf.Phy_addr);//申请的buf物理地址
dst_bidx = 0;
dst_cidx = 0;
edma_set_src(FpgaParam->dma_ch, src_port, INCR, W8BIT);
edma_set_dest(FpgaParam->dma_ch,dst_port,INCR, W8BIT);
edma_set_src_index(FpgaParam->dma_ch, src_bidx, src_cidx);
edma_set_dest_index(FpgaParam->dma_ch, dst_bidx, dst_cidx);
edma_set_transfer_params(FpgaParam->dma_ch,acnt,bcnt,ccnt,bcnt,ABSYNC);
edma_read_slot(FpgaParam->dma_ch, ¶m_set);
param_set.opt |= (1 << ITCINTEN_SHIFT);
param_set.opt |= (1 << TCINTEN_SHIFT);
param_set.opt |= (1 << 3);
param_set.opt |= EDMA_TCC(EDMA_CHAN_SLOT(FpgaParam->dma_ch));
edma_write_slot(FpgaParam->dma_ch, ¶m_set);
result = edma_start(FpgaParam->dma_ch);