Changeset 279 for trunk/hal/tsar_mips32/drivers/soclib_bdv.c
- Timestamp:
- Jul 27, 2017, 12:23:29 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_bdv.c
r265 r279 58 58 void __attribute__ ((noinline)) soclib_bdv_cmd( xptr_t th_xp ) 59 59 { 60 uint32_t cmd_type; 61 uint32_t lba; // command argument62 uint32_t count; // command argument63 xptr_t buf_xp; // command argument64 xptr_t dev_xp; // command argument60 uint32_t cmd_type; // IOC_READ / IOC_WRITE / IOC_SYNC_READ 61 uint32_t lba; 62 uint32_t count; 63 xptr_t buf_xp; 64 xptr_t ioc_xp; 65 65 66 66 // get client thread cluster and local pointer … … 69 69 70 70 // get command arguments and extended pointer on IOC device 71 cmd_type = hal_remote_lw ( XPTR( th_cxy , &th_ptr-> command.ioc.type ) );72 lba = hal_remote_lw ( XPTR( th_cxy , &th_ptr-> command.ioc.lba ) );73 count = hal_remote_lw ( XPTR( th_cxy , &th_ptr-> command.ioc.count ) );74 buf_xp = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr-> command.ioc.buf_xp ) );75 dev_xp = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->command.ioc.dev_xp ) );71 cmd_type = hal_remote_lw ( XPTR( th_cxy , &th_ptr->ioc_cmd.type ) ); 72 lba = hal_remote_lw ( XPTR( th_cxy , &th_ptr->ioc_cmd.lba ) ); 73 count = hal_remote_lw ( XPTR( th_cxy , &th_ptr->ioc_cmd.count ) ); 74 buf_xp = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->ioc_cmd.buf_xp ) ); 75 ioc_xp = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->ioc_cmd.dev_xp ) ); 76 76 77 77 // get IOC device cluster and local pointer 78 cxy_t dev_cxy = GET_CXY( dev_xp );79 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );78 cxy_t ioc_cxy = GET_CXY( ioc_xp ); 79 chdev_t * ioc_ptr = (chdev_t *)GET_PTR( ioc_xp ); 80 80 81 81 // get extended pointer on SOCLIB-BDV peripheral 82 xptr_t bdv_xp = hal_remote_lw( XPTR( dev_cxy , &dev_ptr->base ) );82 xptr_t bdv_xp = hal_remote_lw( XPTR( ioc_cxy , &ioc_ptr->base ) ); 83 83 84 84 // get SOCLIB_BDV device cluster and local pointer … … 114 114 if( status == BDV_READ_SUCCESS ) // successfully completed 115 115 { 116 hal_remote_sw( XPTR( th_cxy , &th_ptr-> command.ioc.error ) , 0 );116 hal_remote_sw( XPTR( th_cxy , &th_ptr->ioc_cmd.error ) , 0 ); 117 117 break; 118 118 } … … 123 123 else // error reported 124 124 { 125 hal_remote_sw( XPTR( th_cxy , &th_ptr-> command.ioc.error ) , 1 );125 hal_remote_sw( XPTR( th_cxy , &th_ptr->ioc_cmd.error ) , 1 ); 126 126 break; 127 127 } … … 161 161 if((status != BDV_READ_SUCCESS) && (status != BDV_WRITE_SUCCESS)) 162 162 { 163 hal_remote_sw( XPTR( client_cxy , &client_ptr-> command.ioc.error ) , 1 );163 hal_remote_sw( XPTR( client_cxy , &client_ptr->ioc_cmd.error ) , 1 ); 164 164 } 165 165 else 166 166 { 167 hal_remote_sw( XPTR( client_cxy , &client_ptr-> command.ioc.error ) , 0 );167 hal_remote_sw( XPTR( client_cxy , &client_ptr->ioc_cmd.error ) , 0 ); 168 168 } 169 169
Note: See TracChangeset
for help on using the changeset viewer.