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.

OMAP4 GPMC NAND DMA error

I have a Spansion 8-bit nand attached to an OMAP4430 Pandaboard through the GPMC header. I can access the nand in NAND_OMAP_PREFETCH_POLLED but NOT in DMA mode. I receive a L3 error when omap_start_dma returns from omap_nand_dma_transfer of omap2.c.

I'm using kernel 3.4 from 

http://dev.omapzoom.org/?p=integration/kernel-ubuntu.git;a=commit;h=3e1c9f139425663ceee48f92e8d3f23158580334.

Here is the error I get (I also dump all the GPMC and DMA registers): http://pastebin.com/EME0u7W7

Any idea what is wrong?

Grégoire

  • Hi Gregoire,

    As I see from the log you've encountered an L3 Standard error, which can be caused by either of the following:
    1. Address whole: read/write to unknown address for a request

    2. Protection violation: you're trying to access address space that is protected by firewall ( if you haven't changed the settings of OMAP HW firewalls, this is the most unlikely cause).

    3. Unsupported command: master has sent the slave a command that cannot be processed.

    Dump the following register, in order to get more info on the L3 error:
    L3_TARG_STDERRLOG_HDR (specifically you need the opcode bit field)

    L3_TARG_STDERRLOG_MSTADDR

    L3_TARG_STDERRLOG_SLVADDR

    L3_TARG_STDERRLOG_INFO

    Best Regards,
    Yordan

  • I have done it and I'm getting:

    L3 0x148 (L3_TARG_STDERRLOG_MAIN): 0x80001
    L3 0x14C (L3_TARG_STDERRLOG_HDR): 0x3c0005
    L3 0x150 (L3_TARG_STDERRLOG_MSTADDR): 0x50
    L3 0x154 (L3_TARG_STDERRLOG_SLVADDR): 0x7
    L3 0x158 (L3_TARG_STDERRLOG_INFO): 0x8d

    So, what's your advice?

    Grégoire

  • Hi Gregoire,

    Based on the above values, your case is:
      -Standard error (bit[1] of MAIN = 0).

      -Your packet is non atomic load wrapping burst (OPCODE = 0x5) with len = 3C 

      -Initiator of the transaction is SDMA_rd (MSTADDR = 0x50 => ConnID = 14h).

      -Slave port, where the error response is logged is 0x7 => GPMC

      -Address at the target side is SLVOFFSLSB << 2 (SLVOFFSLSB is the value of L3_TARG_STDERRLOG_SLVOFSLSB register)

    Based on the above, I have a couple of suggestions: 

    1. I think that most likely the error is an address hole, SDMA_rd port is trying to connect to the nand through a non existing path. Check your data path.

     2. Another thing that is worth checking is the type of request you send. According to the INFO field it is an Opcode fetch and uses MCMD qualifier marked as not used.

    Best Regards,

    Yordan

  • Do you think that the following size is normal?

    root@omaphost:~# cat /proc/iomem | grep nand
    00000000-00000000 : omap2-nand.0
    01000000-01000003 : omap2-nand

    Just before the L3 error, the dma src is phybase = 0x01000000 which seems correct.

    I start to feel a little bit lost on this issue. I have tried more recent kernels and it's the same problem. Has anyone managed to make work omap4 + nand + sdma? Is there a working kernel somewhere I could use?

  • Hi,

    Sorry for the delayed response.

    The phybase = 0x01000000 seems ok.

    I don't have that much experience in working with the gpmc interface. I am not sure which kernel would be best for your use case, but the hardware itself allows handling the described use case omap4 GPMC sdma + nand.

    Here are some threads, that could help you in resolving your issue:

    1. OMAP4 GPMC DMA transfer discussed here: http://e2e.ti.com/support/omap/f/849/p/161654/699814.aspx#699814

    2. Connecting GPMC with external memory:
    https://e2e.ti.com/support/omap/int_omap/f/794/t/212835.aspx

    http://e2e.ti.com/support/omap/f/849/t/306389.aspx

    Best Regards,

    Yordan