Changeset 626 for trunk/kernel/devices/dev_mmc.c
- Timestamp:
- Apr 29, 2019, 7:25:09 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_mmc.c
r605 r626 108 108 109 109 // get buffer cluster and local pointer 110 cxy_t buf_cxy = GET_CXY( buf_xp );111 void* buf_ptr = GET_PTR( buf_xp );110 cxy_t buf_cxy = GET_CXY( buf_xp ); 111 uint8_t * buf_ptr = GET_PTR( buf_xp ); 112 112 113 assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , 114 "buffer not aligned on cache line" ); 113 // force buffer align 114 uint32_t delta = (uint32_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE - 1); 115 uint8_t * base = buf_ptr - delta; 116 uint32_t size = buf_size + delta; 115 117 116 118 // store command arguments in thread descriptor 117 119 this->mmc_cmd.dev_xp = chdev_dir.mmc[buf_cxy]; 118 120 this->mmc_cmd.type = MMC_CC_INVAL; 119 this->mmc_cmd.buf_ptr = b uf_ptr;120 this->mmc_cmd.buf_size = buf_size;121 this->mmc_cmd.buf_ptr = base; 122 this->mmc_cmd.buf_size = size; 121 123 122 124 // call MMC driver … … 152 154 void * buf_ptr = GET_PTR( buf_xp ); 153 155 154 assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , 155 "buffer not aligned on cache line" ); 156 // force buffer align 157 uint32_t delta = (uint32_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE - 1); 158 uint8_t * base = buf_ptr - delta; 159 uint32_t size = buf_size + delta; 156 160 157 161 // store command arguments in thread descriptor 158 162 this->mmc_cmd.dev_xp = chdev_dir.mmc[buf_cxy]; 159 163 this->mmc_cmd.type = MMC_CC_SYNC; 160 this->mmc_cmd.buf_ptr = b uf_ptr;161 this->mmc_cmd.buf_size = buf_size;164 this->mmc_cmd.buf_ptr = base; 165 this->mmc_cmd.buf_size = size; 162 166 163 167 // call MMC driver
Note: See TracChangeset
for help on using the changeset viewer.