Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 06 Feb 2006 01:58 AM by  burelllil
DMA under Linux anyone?
 1 Replies
You are not authorized to post a reply.
Author Messages
New Member
New Member

05 Feb 2006 09:11 AM
    I am trying to make DMA transfers on an M5485EVB under Linux, with zero success atm.
    My goal is to use the DMA to transfer data from/to the DSPI.
    The problem I am having is dual (or -2 does not work because of -1):

    -1) When I call MCD_startDma, the processor freezes shortly after, for a long duration (like 10-15 secs). After that delay, the execution continues.
    MCD_dmaStatus returns immediately 6 (DMA_DONE), but of course nothing has happened, even if I use mem-to-mem transfers (also, see point 2).
    I thought it could be caused by an unhandled interrupt (i guessed that the delay starts as soon as the transfer ends) but all relevant interrupts are masked in the IMR...

    -2) I can't figure out the address that must be passed to MCD_startDma. I tried kernel addresses and physical addresses (gotten via virt_to_phys(ptr)). Neither of them does work on memory-to-memory transfers. Also, I really don't know if addresses in the MBAR region should be translated to physical or not.
    I checked the FEC driver and it seems that memory addresses should be translated via "virt_to_phys", while peripheral registers should not, but i'm not sure of that, as there seems to be no effect.

    Does anybody have a clue? (or pointers? *pun inteded* )
    Thanks a lot in advance for the help,

    Luca Burelli
    DEI-University of Padua (Italy)
    New Member
    New Member

    06 Feb 2006 01:58 AM
    I forgot to add that in the debug process I also found out a bug in the DMA API that is supplied with the kernel. I thought this was an exact copy of the Freescale supplied one, but it turns out it is not.
    Try adding
    #include "MCD_tasksInit.h"
    in MCD_tasksInit.c in the linux-2.4.26/drivers/dma subdir of the latest Logic BSP!
    Who on earth forgot to do that must be shot...

    There are differences in the microcode too-- but I can't get neither of them to work... please help.
    You are not authorized to post a reply.