Changeset 440 for trunk/kernel/devices/dev_mmc.c
- Timestamp:
- May 3, 2018, 5:51:22 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_mmc.c
r438 r440 57 57 58 58 ///////////////////////////////////////////////////////////////////////////// 59 // This static function is called by all MMC device functions.59 // This static function is called by all MMC device access functions. 60 60 // It makes some checking, takes the lock granting exclusive 61 61 // access to MMC peripheral, call the driver to execute the command … … 71 71 // get MMC device cluster identifier & local pointer 72 72 cxy_t dev_cxy = GET_CXY( dev_xp ); 73 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );73 chdev_t * dev_ptr = GET_PTR( dev_xp ); 74 74 75 75 // get driver command function pointer from MMC device descriptor … … 97 97 98 98 // get calling thread local pointer 99 thread_t * this= CURRENT_THREAD;99 thread_t * this = CURRENT_THREAD; 100 100 101 101 #if DEBUG_DEV_MMC … … 113 113 "buffer not aligned on cache line" ); 114 114 115 // get buffer physical address116 paddr_t buf_paddr;117 error = vmm_v2p_translate( CONFIG_KERNEL_IDENTITY_MAP , buf_ptr , &buf_paddr );118 119 assert( (error == 0) , __FUNCTION__ , "cannot get buffer paddr" );120 121 115 // store command arguments in thread descriptor 122 116 this->mmc_cmd.dev_xp = chdev_dir.mmc[buf_cxy]; 123 117 this->mmc_cmd.type = MMC_CC_INVAL; 124 this->mmc_cmd.buf_p addr = buf_paddr;118 this->mmc_cmd.buf_ptr = buf_ptr; 125 119 this->mmc_cmd.buf_size = buf_size; 126 120 … … 144 138 error_t error; 145 139 146 // get calling thread local pointer 147 thread_t * this = CURRENT_THREAD; 140 thread_t * this = CURRENT_THREAD; 148 141 149 142 #if DEBUG_DEV_MMC … … 161 154 "buffer not aligned on cache line" ); 162 155 163 // get buffer physical address164 paddr_t buf_paddr;165 error = vmm_v2p_translate( CONFIG_KERNEL_IDENTITY_MAP , buf_ptr , &buf_paddr );166 167 assert( (error == 0) , __FUNCTION__ , "cannot get buffer paddr" );168 169 156 // store command arguments in thread descriptor 170 157 this->mmc_cmd.dev_xp = chdev_dir.mmc[buf_cxy]; 171 158 this->mmc_cmd.type = MMC_CC_SYNC; 172 this->mmc_cmd.buf_p addr = buf_paddr;159 this->mmc_cmd.buf_ptr = buf_ptr; 173 160 this->mmc_cmd.buf_size = buf_size; 174 161
Note: See TracChangeset
for help on using the changeset viewer.