Changeset 432 for trunk/hal/tsar_mips32/drivers/soclib_tty.c
- Timestamp:
- Feb 14, 2018, 3:39:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_tty.c
r424 r432 72 72 #endif 73 73 74 txt_dmsg("\n[DBG] %s : core[%x,%d] / DEV thread enter / cycle %d\n", 75 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() ); 74 #if CONFIG_DEBUG_HAL_TXT 75 uint32_t cycle = (uint32_t)hal_get_cycles(); 76 if (CONFIG_DEBUG_HAL_TXT < cycle ) 77 printk("\n[DBG] %s : thread %x enter / cycle %d\n", 78 __FUNCTION__ , CURRENT_THREAD , cycle ); 79 #endif 76 80 77 81 // get client thread cluster and local pointer … … 108 112 hal_remote_sw( reg_xp , 1 ); 109 113 110 txt_dmsg("\n[DBG] %s : core[%x,%d] DEV thread deschedule / cycle %d\n", 111 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() ); 114 #if CONFIG_DEBUG_HAL_TXT 115 cycle = (uint32_t)hal_get_cycles(); 116 if (CONFIG_DEBUG_HAL_TXT < cycle ) 117 printk("\n[DBG] %s : thread %x deschedule / cycle %d\n", 118 __FUNCTION__ , CURRENT_THREAD , cycle ); 119 #endif 112 120 113 121 // Block and deschedule server thread … … 115 123 sched_yield("blocked on ISR"); 116 124 117 txt_dmsg("\n[DBG] %s : core[%x,%d] / DEV thread resume / cycle %d\n", 118 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() ); 125 #if CONFIG_DEBUG_HAL_TXT 126 cycle = (uint32_t)hal_get_cycles(); 127 if (CONFIG_DEBUG_HAL_TXT < cycle ) 128 printk("\n[DBG] %s : thread %x resume / cycle %d\n", 129 __FUNCTION__ , CURRENT_THREAD , cycle ); 130 #endif 119 131 120 132 #if CONFIG_READ_DEBUG … … 184 196 #endif 185 197 198 #if CONFIG_DEBUG_HAL_TXT 199 uint32_t cycle = (uint32_t)hal_get_cycles(); 200 if (CONFIG_DEBUG_HAL_TXT < cycle) 201 printk("\n[DBG] %s : enter / cycle %d\n", __FUNCTION__ , cycle ); 202 #endif 203 186 204 // get extended pointer on client thread 187 205 xptr_t root = XPTR( local_cxy , &chdev->wait_root ); … … 197 215 buf_xp = hal_remote_lwd( XPTR( client_cxy , &client_ptr->txt_cmd.buf_xp ) ); 198 216 199 txt_dmsg("\n[DBG] %s : core[%x,%d] enter / cycle %d\n",200 __FUNCTION__ , local_cxy, CURRENT_THREAD->core->lid , hal_time_stamp() );201 202 217 // get SOCLIB_TTY peripheral cluster and local pointer 203 218 cxy_t tty_cxy = GET_CXY( chdev->base ); … … 234 249 hal_remote_sw( reg_xp , 0 ); 235 250 } 236 else if( type == TXT_WRITE )// write all characters in string251 else // type == TXT_WRITE // write all characters in string 237 252 { 238 253 // loop on characters … … 276 291 hal_fence(); 277 292 278 txt_dmsg("\n[DBG] %s : core[%x,%d] exit / cycle %d\n", 279 __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , hal_time_stamp() ); 293 #if CONFIG_DEBUG_HAL_TXT 294 cycle = (uint32_t)hal_get_cycles(); 295 if (CONFIG_DEBUG_HAL_TXT < cycle) 296 { 297 if( type == TXT_READ) 298 printk("\n[DBG] %s : exit after RX / cycle %d\n", __FUNCTION__ , cycle ); 299 else 300 printk("\n[DBG] %s : exit after TX / cycle %d\n", __FUNCTION__ , cycle ); 301 } 302 #endif 280 303 281 304 #if (CONFIG_READ_DEBUG & 0x1) || (CONFIG_WRITE_DEBUG & 0x1)
Note: See TracChangeset
for help on using the changeset viewer.