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.

OMAP35x burst problem operation in linux

Other Parts Discussed in Thread: OMAP3530

Hi all

I use omap3530  connect to my FPGA chip with GPMC, and config GPMC at burst mode.

And now I want to know in linux, which linux function of read and write causes cpu  operating at burst mode.

I try some functions of multiread : readsb,readsw,readsl and memcpy.

But checkd with an oscilloscope, it seems that omap3530 still opeartes at none burst mode.

ps: The time parameter of GPMC has been configed according to gpmc burst read mode in omap35x user manual. I config that omap burst at 16 words burst mode and multiplex addr/data.

For example I want to read 16 words

In none burst mode, I use single read linux function readw, it will be 16 times cs, that is 16 times reads. And observe with an oscilloscope, that is right.

In burst mode, I use multiread linux function readw/memcpy, it also be 16 time cs, but in my opinion,  it should be 1 time cs.

thanks!

  •  

    I found a few ways to do this for bursting 4-words.  I haven't figured out how to get a burst of 16.

     

    1. Use a 64-bit pointer. 

    u64 *ptr = fpga_address_location;

    *return_data = *ptr; // generates burst of 4 16-bit words if GPMC is configured correctly.

     

    2. Use inline assembly:

    u64 *ptr = fpga_address_location;

      asm volatile (
             "ldmia %[in]!, {r3-r10} \n\t"
             "stmia %[out]!, {r3-r10} \n\t"
             :[out]"+r" (return_data)
             :[in]"r" (ptr)
             :"r3","r4","r5","r6","r7","r8","r9","r10","memory"
        );

    I believe this should do a burst of 16 words, but it ends up doing 4 bursts of 4 words.  Better than individual reads, but still not what I want.

     

    Hope this helps.

     

     

  • Jinhu,

    The short answer is that you should use System DMA to generate bursts larger than 64 bits on the L3 interconnect.  See this post for a deeper explanation.

    Brad

  • hi,brad,

    I read so many materials on this forum,I found you have answered so many questions about GPMC.I just want to do 64bits burst,but it seems the dataline are driven down,only zeros.please help me,If you need all the source code,I can email to you. 

    sinceI do the single read and write well.but I met a problem when I do the sync burst read:

    I export the function gpmc_cs_set_timings ,and add some code like below to do the sync burst read:

    l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
    l=l|GPMC_CONFIG1_READTYPE_SYNC;
    l=l|GPMC_CONFIG1_READMULTIPLE_SUPP;
    l=l|GPMC_CONFIG1_CLKACTIVATIONTIME(1);
    gpmc_cs_write_reg(cs, GPMC_CS_CONFIG6, 0x0);

    I call this function in my driver code,print the register,the result is look like below,I only want to do sync burst read,but I can't read anything on the D[0]-D[15] lines

    I am looking forward to your reply.please help me,if you can give me some source code about sync burst read,It would be better for me to understand.Thanks again.

    GPMC_CS_CONFIG1=62001001
    GPMC_CS_CONFIG2=001c0b00
    GPMC_CS_CONFIG3=00010900
    GPMC_CS_CONFIG4=16090b00
    GPMC_CS_CONFIG5=02091e0b
    GPMC_CS_CONFIG6=00000000
    GPMC_CS_CONFIG7=00000f6c