Changeset 506 for soft/giet_vm/giet_drivers
- Timestamp:
- Feb 10, 2015, 5:41:22 PM (10 years ago)
- Location:
- soft/giet_vm/giet_drivers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/cma_driver.c
r456 r506 34 34 } 35 35 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 }60 36 61 37 ////////////////////////////////////// -
soft/giet_vm/giet_drivers/cma_driver.h
r448 r506 34 34 CHBUF_RUN = 0, // write-only : channel activated 35 35 CHBUF_STATUS = 1, // read-only : channel fsm state 36 CHBUF_SRC_DESC = 2, // read/write : source chbuf : descriptorbase address37 CHBUF_DST_DESC = 3, // read/write : dest ination chbuf : descriptor base address,38 CHBUF_SRC_NBUFS = 4, // read/write : source chbuf : number of buffers,39 CHBUF_DST_NBUFS = 5, // read/write : dest ination chbuf : number of buffers,40 CHBUF_BUF_SIZE = 6, // read/write : buffer size for both source & destination36 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 41 41 CHBUF_PERIOD = 7, // read/write : period for status polling 42 CHBUF_SRC_EXT = 8, // read/write : source chbuf : descriptor base address43 CHBUF_DST_EXT = 9, // read/write : dest ination 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 44 44 /****/ 45 45 CHBUF_CHANNEL_SPAN = 1024, … … 102 102 unsigned int value ); 103 103 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 113 104 extern void _cma_isr( unsigned int irq_type, 114 105 unsigned int irq_id,
Note: See TracChangeset
for help on using the changeset viewer.