Changeset 570 for trunk/hal/tsar_mips32/drivers/soclib_dma.c
- Timestamp:
- Oct 5, 2018, 12:08:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_dma.c
r451 r570 40 40 41 41 // enable interrupts 42 hal_remote_s w( XPTR( dma_cxy , dma_ptr + DMA_IRQ_DISABLED ) , 0 );42 hal_remote_s32( XPTR( dma_cxy , dma_ptr + DMA_IRQ_DISABLED ) , 0 ); 43 43 44 44 } // soclib_dma_init() … … 57 57 58 58 // get command arguments and extended pointer on DMA device 59 dev_xp = (xptr_t)hal_remote_l wd( XPTR( thread_cxy , &thread_ptr->dma_cmd.dev_xp ) );60 dst_xp = (xptr_t)hal_remote_l wd( XPTR( thread_cxy , &thread_ptr->dma_cmd.dst_xp ) );61 src_xp = (xptr_t)hal_remote_l wd( XPTR( thread_cxy , &thread_ptr->dma_cmd.src_xp ) );62 size = hal_remote_l w( XPTR( thread_cxy , &thread_ptr->dma_cmd.size ) );59 dev_xp = (xptr_t)hal_remote_l64( XPTR( thread_cxy , &thread_ptr->dma_cmd.dev_xp ) ); 60 dst_xp = (xptr_t)hal_remote_l64( XPTR( thread_cxy , &thread_ptr->dma_cmd.dst_xp ) ); 61 src_xp = (xptr_t)hal_remote_l64( XPTR( thread_cxy , &thread_ptr->dma_cmd.src_xp ) ); 62 size = hal_remote_l32 ( XPTR( thread_cxy , &thread_ptr->dma_cmd.size ) ); 63 63 64 64 // get DMA device cluster and local pointer … … 67 67 68 68 // get extended pointer on SOCLIB-DMA peripheral 69 xptr_t dma_xp = hal_remote_l w( XPTR( dev_cxy , &dev_ptr->base ) );69 xptr_t dma_xp = hal_remote_l32( XPTR( dev_cxy , &dev_ptr->base ) ); 70 70 71 71 // get SOCLIB_DMA device cluster and local pointer … … 83 83 84 84 // set SOCLIB_DMA registers to start tranfer operation 85 hal_remote_s w( XPTR( dma_cxy , base + DMA_SRC ) , src_lsb );86 hal_remote_s w( XPTR( dma_cxy , base + DMA_SRC_EXT ) , src_msb );87 hal_remote_s w( XPTR( dma_cxy , base + DMA_DST ) , dst_lsb );88 hal_remote_s w( XPTR( dma_cxy , base + DMA_DST_EXT ) , dst_msb );89 hal_remote_s w( XPTR( dma_cxy , base + DMA_LEN ) , size );85 hal_remote_s32( XPTR( dma_cxy , base + DMA_SRC ) , src_lsb ); 86 hal_remote_s32( XPTR( dma_cxy , base + DMA_SRC_EXT ) , src_msb ); 87 hal_remote_s32( XPTR( dma_cxy , base + DMA_DST ) , dst_lsb ); 88 hal_remote_s32( XPTR( dma_cxy , base + DMA_DST_EXT ) , dst_msb ); 89 hal_remote_s32( XPTR( dma_cxy , base + DMA_LEN ) , size ); 90 90 91 91 // Block and deschedule server thread … … 100 100 // get extended pointer on client thread 101 101 xptr_t root = XPTR( local_cxy , &chdev->wait_root ); 102 xptr_t client_xp = XLIST_FIRST _ELEMENT( root , thread_t , wait_list );102 xptr_t client_xp = XLIST_FIRST( root , thread_t , wait_list ); 103 103 104 104 // get extended pointer on server thread … … 117 117 118 118 // get DMA status register 119 uint32_t status = hal_remote_l w( XPTR( dma_cxy , base + DMA_LEN ) );119 uint32_t status = hal_remote_l32( XPTR( dma_cxy , base + DMA_LEN ) ); 120 120 121 121 // acknowledge IRQ 122 hal_remote_s w( XPTR( dma_cxy , base + DMA_RESET ) , 0 );122 hal_remote_s32( XPTR( dma_cxy , base + DMA_RESET ) , 0 ); 123 123 124 124 // set operation status in command 125 125 error_t error = ( status != DMA_SUCCESS ); 126 hal_remote_s w( XPTR( client_cxy , &client_ptr->dma_cmd.error ) , error );126 hal_remote_s32( XPTR( client_cxy , &client_ptr->dma_cmd.error ) , error ); 127 127 128 128 // unblock server thread
Note: See TracChangeset
for help on using the changeset viewer.