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.

a question about gpmc Synchronous + burst + edma?

Other Parts Discussed in Thread: AM3354

now  i  connect am3354 with a fpga by gpmc,i  have configured the gpmc Synchronous burst mode,and i  have want to  read  4kb  datas from fpga by edma ,from  oscilloscope i  can see the  wave form is  is similar to Figure 7-45.but  i  can  only get    the  4th  data  in  the edma destination address,the ahead 3 datas are all lost,who can tell me what can i do to solve the problem?thankyou very much.

the  follow is my   configuration:

1,gpmc   configuration:

val = GPMC_CONFIG1_READMULTIPLE_SUPP;

val |= GPMC_CONFIG1_WRAPBURST_SUPP;
val |= GPMC_CONFIG1_READTYPE_SYNC;
val |= GPMC_CONFIG1_WRITETYPE_SYNC;
val |= GPMC_CONFIG1_CLKACTIVATIONTIME(1);
val |= GPMC_CONFIG1_PAGE_LEN(0);
val |= GPMC_CONFIG1_DEVICESIZE_16;
val |= GPMC_CONFIG1_DEVICETYPE_NOR;
gpmc_cs_write_reg(GPMC_FPGA_CS, GPMC_CS_CONFIG1, val);

2,edma configuration

edma_r_base = kmalloc(2 * 2048,GFP_KERNEL);
edma_r_phy_base = dma_map_single(NULL,edma_r_base,2048*2,DMA_FROM_DEVICE);
if (dma_mapping_error(NULL, edma_r_phy_base)) {
myprintk("fail to dma_map_single");
return -EIO;
}

edma_set_src (dma_ch, (unsigned short *)fpga_phy_base + args, INCR, W16BIT);

edma_set_dest (dma_ch, (unsigned short *)edma_r_phy_base, INCR, W16BIT);

edma_set_src_index (dma_ch, 0, 0); // use fifo, set zero

edma_set_dest_index (dma_ch, 2,2048 * 2 ); // A mode


edma_set_transfer_params (dma_ch, 2, 2048, 1, 1, ABSYNC);
edma_read_slot (dma_ch, &param_set);
param_set.opt |= (1 << ITCINTEN_SHIFT);
param_set.opt |= (1 << TCINTEN_SHIFT);
param_set.opt |= EDMA_TCC(EDMA_CHAN_SLOT(dma_ch));
edma_write_slot (dma_ch, &param_set);

3,start  edma

init_completion(&my_completion);

ret = edma_start(dma_ch);//开始传输

if(ret != 0)
{
   printk("fail to edma_start");
}

wait_for_completion(&my_completion);
edma_stop(dma_ch);