ts-7000
[Top] [All Lists]

Re: [ts-7000] DMA with SSP on TS7400

To:
Subject: Re: [ts-7000] DMA with SSP on TS7400
From: "Breton M. Saunders" <>
Date: Mon, 15 Mar 2010 16:52:57 +0000
Did you flush the CPU cache after modifying memory that you expect to be 
DMAed out?

If not, then you're likely transmitting data that is in physical ram 
prior to the cpu actually writing data back to physical ram.

The SSP engine is pretty poor on this chip:
  * PIO mode is missing signals so you can use (at best) half of the 
fifo in an interrupt driven mode.
  * DMA works, but you need to use both M2M channels, and the setup 
costs aren't cheap on those.  DMA is really only appropriate for 
something like 128 byte or larger transfers.

    -bms

pakorn_0608 wrote:
> Dear members,
>
> I'm use DMA on M2M mode with SSP, both of SSPTx and SSPRx for each channel.
>
> I have a bit problem with data that transmit and receive from SSP.
>
> I use "kmalloc" to get allocate memory address and i write some data into 
> that address.
> I can write and read correctly by using "printk".
>
> I'm also use it with SSPDR for transmit data from SPI by "outl" command, data 
> come out from SSPTx with clock sync correctly.
>
> Anyway,It's wrong when i'm using with DMA register.
>
> For example, DMA M2M0 using with SSPtx, I set DMA register, source register 
> with address from kmalloc "0xd120_10eo", destination address SSPDR 
> "0x808A_0008" and BCR by 3.
>
> There are data come out from SSPtx but it is not right value that it should 
> be in memory address  shown by "printk".
>
> Could someone have some suggest to me for using DMA with SSP for 7400 board?
>
> *******************
> example with some coding:
> *******************
>
>
> /* I write it for kernel module*/
> ...
> char *buffer_dma[MAX_EP93XX_DMA_M2M_CHANNELS];
> .
> .
> .
>   buffer_dma[0] = kmalloc( size , GFP_KERNEL|GFP_DMA);   /* example size is 
> 10*/
>
> for(i=0;i<10;i++)
> {
>        buffer_dma[0][i] = i*10;
>
>        printk("Address of buffer_dma[0][%d] = 0x%lx\n",i,(unsigned 
> long)&buffer_dma[0][i]);
>        printk("Value of buffer_dma[0][%d] = %d\n",i,buffer_dma[0][i]);
> }
>
> /*
> I print this value for show address and value
> my address for buffer_dma[0][0]  is "0xd120_10eo" and value is 0
> next, address for buffer_dma[0][1]  is "0xd120_10e1" and value is 10... and 
> other value is shown correctly.
>
> I also use with SSP
>
> */
>
> for(i=0;i<10;i++)
> {
>    outl(buffer_dma[0][i] , SSPDR );
> }
>
> /*
> I'm set SSP 8 bit,
> data come out from SSPTx is correctly , compare bit by bit with ssp_clock
>
> next i'm usongit with DMA M2M for SSPTx
>
> */
>
>
> outl(&buffer_dma[0][0] , m2m_channel[channel].base + M2M_SAR_BASE0);
> outl( SSPDR                  , m2m_channel[channel].base + M2M_DAR_BASE0);
> outl(3 , m2m_channel[channel].base + M2M_BCR0);
>
> /*
> After that i'm enable DMA 
> my data that come out from SSPTx is wrong all,
> even i change data in my buffer_dma[0][i] on above 
> data come out from SSPTx is still the same value.
> It's not match with it should be in memory address
> */
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU