Ignore:
Timestamp:
Feb 10, 2015, 5:41:22 PM (10 years ago)
Author:
alain
Message:

Simplifying the CMA driver.

Location:
soft/giet_vm/giet_drivers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/cma_driver.c

    r456 r506  
    3434}
    3535
    36 ////////////////////////////////////////////////////
    37 void _cma_channel_start( unsigned int       channel,
    38                          unsigned long long src_paddr,
    39                          unsigned int       src_nbufs,
    40                          unsigned long long dst_paddr,
    41                          unsigned int       dst_nbufs,
    42                          unsigned int       buf_length )
    43 {
    44     _cma_set_register( channel, CHBUF_SRC_DESC , (unsigned int)(src_paddr & 0xFFFFFFFF) );
    45     _cma_set_register( channel, CHBUF_SRC_EXT  , (unsigned int)(src_paddr >> 32) );
    46     _cma_set_register( channel, CHBUF_SRC_NBUFS, src_nbufs );
    47     _cma_set_register( channel, CHBUF_DST_DESC , (unsigned int)(dst_paddr & 0xFFFFFFFF) );
    48     _cma_set_register( channel, CHBUF_DST_EXT  , (unsigned int)(dst_paddr >> 32) );
    49     _cma_set_register( channel, CHBUF_DST_NBUFS, dst_nbufs );
    50     _cma_set_register( channel, CHBUF_BUF_SIZE , buf_length );
    51     _cma_set_register( channel, CHBUF_PERIOD   , 300 );
    52     _cma_set_register( channel, CHBUF_RUN      , 1 );
    53 }
    54 
    55 //////////////////////////////////////////////
    56 void _cma_channel_stop( unsigned int channel )
    57 {
    58     _cma_set_register( channel, CHBUF_RUN, 0 );
    59 }
    6036
    6137//////////////////////////////////////
  • soft/giet_vm/giet_drivers/cma_driver.h

    r448 r506  
    3434    CHBUF_RUN           = 0,    // write-only : channel activated
    3535    CHBUF_STATUS        = 1,    // read-only  : channel fsm state
    36     CHBUF_SRC_DESC      = 2,    // read/write : source chbuf : descriptor base address
    37     CHBUF_DST_DESC      = 3,    // read/write : destination chbuf : descriptor base address,
    38     CHBUF_SRC_NBUFS     = 4,    // read/write : source chbuf : number of buffers,
    39     CHBUF_DST_NBUFS     = 5,    // read/write : destination chbuf : number of buffers,
    40     CHBUF_BUF_SIZE      = 6,    // read/write : buffer size for both source & destination 
     36    CHBUF_SRC_DESC      = 2,    // read/write : source chbuf pbase address
     37    CHBUF_DST_DESC      = 3,    // read/write : dest chbuf pbase address
     38    CHBUF_SRC_NBUFS     = 4,    // read/write : source chbuf number of buffers
     39    CHBUF_DST_NBUFS     = 5,    // read/write : dest chbuf number of buffers
     40    CHBUF_BUF_SIZE      = 6,    // read/write : buffer size for source & dest 
    4141    CHBUF_PERIOD        = 7,    // read/write : period for status polling
    42     CHBUF_SRC_EXT       = 8,    // read/write : source chbuf : descriptor base address
    43     CHBUF_DST_EXT       = 9,    // read/write : destination chbuf : descriptor base address,
     42    CHBUF_SRC_EXT       = 8,    // read/write : source chbuf pbase extension
     43    CHBUF_DST_EXT       = 9,    // read/write : dest chbuf pbase extension
    4444    /****/
    4545    CHBUF_CHANNEL_SPAN  = 1024,
     
    102102                               unsigned int value );
    103103
    104 void _cma_channel_start( unsigned int       channel,
    105                          unsigned long long src_paddr,
    106                          unsigned int       src_nbufs,
    107                          unsigned long long dst_paddr,
    108                          unsigned int       dst_nbufs,
    109                          unsigned int       buf_length );
    110 
    111 void _cma_channel_stop( unsigned int channel );
    112 
    113104extern void _cma_isr( unsigned int irq_type,
    114105                      unsigned int irq_id,
Note: See TracChangeset for help on using the changeset viewer.