Changeset 570 for trunk/hal/tsar_mips32/drivers/soclib_mmc.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_mmc.c
r451 r570 27 27 #include <dev_mmc.h> 28 28 #include <soclib_mmc.h> 29 #include <spinlock.h>30 29 #include <thread.h> 31 30 #include <printk.h> … … 62 61 63 62 // get command type and extended pointer on MMC device 64 type = hal_remote_l w( XPTR( th_cxy , &th_ptr->mmc_cmd.type ) );65 dev_xp = (xptr_t)hal_remote_l wd( XPTR( th_cxy , &th_ptr->mmc_cmd.dev_xp ) );63 type = hal_remote_l32 ( XPTR( th_cxy , &th_ptr->mmc_cmd.type ) ); 64 dev_xp = (xptr_t)hal_remote_l64( XPTR( th_cxy , &th_ptr->mmc_cmd.dev_xp ) ); 66 65 67 66 // get MMC device cluster and local pointer … … 70 69 71 70 // get cluster and pointers for SOCLIB_MMC peripheral segment base 72 xptr_t seg_xp = (xptr_t)hal_remote_l wd( XPTR( dev_cxy , &dev_ptr->base ) );71 xptr_t seg_xp = (xptr_t)hal_remote_l64( XPTR( dev_cxy , &dev_ptr->base ) ); 73 72 cxy_t seg_cxy = GET_CXY( seg_xp ); 74 73 uint32_t * seg_ptr = GET_PTR( seg_xp ); … … 78 77 // get buffer pointer and size 79 78 buf_ptr = hal_remote_lpt( XPTR( th_cxy , &th_ptr->mmc_cmd.buf_ptr ) ); 80 buf_size = hal_remote_l w( XPTR( th_cxy , &th_ptr->mmc_cmd.buf_size ) );79 buf_size = hal_remote_l32 ( XPTR( th_cxy , &th_ptr->mmc_cmd.buf_size ) ); 81 80 82 81 // set command type … … 86 85 87 86 // set SOCLIB_MMC registers to start INVAL/SYNC operation 88 hal_remote_s w( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_LO ) , (uint32_t)buf_ptr );89 hal_remote_s w( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_HI ) , (uint32_t)dev_cxy );90 hal_remote_s w( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_BUF_LENGTH ) , buf_size );91 hal_remote_s w( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_CMD_TYPE ) , cc_cmd );87 hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_LO ) , (uint32_t)buf_ptr ); 88 hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_HI ) , (uint32_t)dev_cxy ); 89 hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_BUF_LENGTH ) , buf_size ); 90 hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_CMD_TYPE ) , cc_cmd ); 92 91 } 93 92 else // (type == MMC_GET_ERROR) or (type == MMC_GET_ERROR) pr (type == MMC_GET_INSTRU ) … … 95 94 // get src/dst buffer local pointer and register index 96 95 reg_ptr = (uint32_t *)hal_remote_lpt( XPTR( th_cxy , &th_ptr->mmc_cmd.reg_ptr ) ); 97 reg_index = hal_remote_l w( XPTR( th_cxy , &th_ptr->mmc_cmd.reg_index ) );96 reg_index = hal_remote_l32( XPTR( th_cxy , &th_ptr->mmc_cmd.reg_index ) ); 98 97 99 98 // move register to/from local buffer 100 99 if( (type == MMC_GET_ERROR) || (type == MMC_GET_INSTRU) ) 101 100 { 102 *reg_ptr = hal_remote_l w( XPTR( seg_cxy , seg_ptr + reg_index ) );101 *reg_ptr = hal_remote_l32( XPTR( seg_cxy , seg_ptr + reg_index ) ); 103 102 } 104 103 else // type == MMC_SET_ERROR 105 104 { 106 hal_remote_s w( XPTR( seg_cxy , seg_ptr + reg_index ) , *reg_ptr );105 hal_remote_s32( XPTR( seg_cxy , seg_ptr + reg_index ) , *reg_ptr ); 107 106 } 108 107 }
Note: See TracChangeset
for help on using the changeset viewer.