Ignore:
Timestamp:
Oct 5, 2018, 12:08:35 AM (6 years ago)
Author:
alain
Message:

Introduction of the soclib_mty driver for the TSAR-LETI architecture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_dma.c

    r451 r570  
    4040
    4141    // enable interrupts
    42         hal_remote_sw( XPTR( dma_cxy , dma_ptr + DMA_IRQ_DISABLED ) , 0 );
     42        hal_remote_s32( XPTR( dma_cxy , dma_ptr + DMA_IRQ_DISABLED ) , 0 );
    4343
    4444} // soclib_dma_init()
     
    5757
    5858    // get command arguments and extended pointer on DMA device
    59     dev_xp = (xptr_t)hal_remote_lwd( XPTR( thread_cxy , &thread_ptr->dma_cmd.dev_xp ) );
    60     dst_xp = (xptr_t)hal_remote_lwd( XPTR( thread_cxy , &thread_ptr->dma_cmd.dst_xp ) );
    61     src_xp = (xptr_t)hal_remote_lwd( XPTR( thread_cxy , &thread_ptr->dma_cmd.src_xp ) );
    62     size   =         hal_remote_lw ( 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   ) );
    6363
    6464    // get DMA device cluster and local pointer
     
    6767
    6868    // get extended pointer on SOCLIB-DMA peripheral
    69     xptr_t     dma_xp = hal_remote_lw( XPTR( dev_cxy , &dev_ptr->base ) );
     69    xptr_t     dma_xp = hal_remote_l32( XPTR( dev_cxy , &dev_ptr->base ) );
    7070
    7171    // get SOCLIB_DMA device cluster and local pointer
     
    8383
    8484    // set SOCLIB_DMA registers to start tranfer operation
    85     hal_remote_sw( XPTR( dma_cxy , base + DMA_SRC     ) , src_lsb );
    86     hal_remote_sw( XPTR( dma_cxy , base + DMA_SRC_EXT ) , src_msb );
    87     hal_remote_sw( XPTR( dma_cxy , base + DMA_DST     ) , dst_lsb );
    88     hal_remote_sw( XPTR( dma_cxy , base + DMA_DST_EXT ) , dst_msb );
    89     hal_remote_sw( 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    );
    9090
    9191    // Block and deschedule server thread
     
    100100    // get extended pointer on client thread
    101101    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 );
    103103
    104104    // get extended pointer on server thread
     
    117117
    118118    // get DMA status register
    119         uint32_t status = hal_remote_lw( XPTR( dma_cxy , base + DMA_LEN ) );   
     119        uint32_t status = hal_remote_l32( XPTR( dma_cxy , base + DMA_LEN ) );   
    120120
    121121    // acknowledge IRQ
    122     hal_remote_sw( XPTR( dma_cxy , base + DMA_RESET ) , 0 );
     122    hal_remote_s32( XPTR( dma_cxy , base + DMA_RESET ) , 0 );
    123123
    124124    // set operation status in command
    125125        error_t  error = ( status != DMA_SUCCESS );
    126     hal_remote_sw( XPTR( client_cxy , &client_ptr->dma_cmd.error ) , error );
     126    hal_remote_s32( XPTR( client_cxy , &client_ptr->dma_cmd.error ) , error );
    127127
    128128    // unblock server thread
Note: See TracChangeset for help on using the changeset viewer.