Changeset 679 for trunk/hal/tsar_mips32/drivers
- Timestamp:
- Nov 20, 2020, 12:30:31 AM (4 years ago)
- Location:
- trunk/hal/tsar_mips32/drivers
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_bdv.c
r657 r679 89 89 if ( (cmd_type == IOC_READ) || (cmd_type == IOC_SYNC_READ) ) op = BDV_OP_READ; 90 90 else if( (cmd_type == IOC_WRITE) || (cmd_type == IOC_SYNC_WRITE) ) op = BDV_OP_WRITE; 91 else assert( false , "illegal command" );91 else assert( __FUNCTION__, false , "illegal command" ); 92 92 93 93 // get cluster and local pointer on IOC chdev … … 317 317 else 318 318 { 319 assert( false , "illegal command %d", cmd_type );319 assert( __FUNCTION__, false , "illegal command %d", cmd_type ); 320 320 } 321 321 -
trunk/hal/tsar_mips32/drivers/soclib_fbf.c
r657 r679 63 63 uint32_t npixels; // number of pixels to move 64 64 xptr_t fbf_xp; // extended pointer on FBF chdev descriptor 65 uint32_t status; // I/0 operation status (from BDV)66 65 void * buffer; // pointer on kernel or user buffer 67 66 -
trunk/hal/tsar_mips32/drivers/soclib_hba.c
r570 r679 188 188 { 189 189 // fatal if synchronous access 190 assert( cmd_type == IOC_SYNC_READ, "no slot available for a IOC_SYNC_READ\n" );190 assert( __FUNCTION__, cmd_type == IOC_SYNC_READ, "no slot available for a IOC_SYNC_READ\n" ); 191 191 sched_yield( "blocked on ISR" ); 192 192 } -
trunk/hal/tsar_mips32/drivers/soclib_memc.c
r494 r679 172 172 uint_t *dst; 173 173 174 assert( rq->file != NULL, "rq->file should'nt be NULL.\n");174 assert( __FUNCTION__,rq->file != NULL, "rq->file should'nt be NULL.\n"); 175 175 176 176 count = rq->count >> 2; /* 32 bits registers */ -
trunk/hal/tsar_mips32/drivers/soclib_mty.c
r587 r679 230 230 else 231 231 { 232 assert( false , __FUNCTION__, "illegal TXT command\n" );232 assert( __FUNCTION__, false , "illegal TXT command\n" ); 233 233 } 234 234 … … 321 321 322 322 // check process exist 323 assert( (owner_xp != XPTR_NULL) , __FUNCTION__, 324 "TXT owner process not found\n" ); 323 assert( __FUNCTION__, (owner_xp != XPTR_NULL) , "TXT owner process not found\n" ); 325 324 326 325 // get relevant infos on TXT owner process … … 376 375 377 376 // check process exist 378 assert( (owner_xp != XPTR_NULL) , __FUNCTION__, 379 "TXT owner process not found\n" ); 377 assert( __FUNCTION__, (owner_xp != XPTR_NULL) , "TXT owner process not found\n" ); 380 378 381 379 // get relevant infos on TXT owner process -
trunk/hal/tsar_mips32/drivers/soclib_nic.c
r658 r679 268 268 269 269 // check calling thread == client thread 270 assert( (thread_xp == XPTR( local_cxy , this )), "calling thread must be the client thread");270 assert( __FUNCTION__, (thread_xp == XPTR( local_cxy , this )), "calling thread must be the client thread"); 271 271 272 272 // get command type … … 286 286 287 287 // check chdev is local 288 assert( (dev_cxy == local_cxy), "illegal cluster for a WRITE command");288 assert( __FUNCTION__, (dev_cxy == local_cxy), "illegal cluster for a WRITE command"); 289 289 290 290 // get command arguments … … 293 293 294 294 // check packet length 295 assert( (length <= 2040), "packet length too large");295 assert( __FUNCTION__, (length <= 2040), "packet length too large"); 296 296 297 297 // get chbuf descriptor pointer … … 377 377 378 378 // check chdev is local 379 assert( (dev_cxy == local_cxy), "illegal cluster for a READ command");379 assert( __FUNCTION__, (dev_cxy == local_cxy), "illegal cluster for a READ command"); 380 380 381 381 // get target buffer … … 604 604 default: 605 605 { 606 assert( false, "Unknown command <%x>\n", type );606 assert( __FUNCTION__, false, "Unknown command <%x>\n", type ); 607 607 } 608 608 } -
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r635 r679 58 58 soclib_pic_cluster_t * ext_ptr = LOCAL_CLUSTER->pic_extend; 59 59 60 assert( (ext_ptr->first_free_wti < ext_ptr->wti_nr) ,60 assert( __FUNCTION__, (ext_ptr->first_free_wti < ext_ptr->wti_nr) , 61 61 "no free WTI found : too much external IRQs\n"); 62 62 … … 147 147 if( index < LOCAL_CLUSTER->cores_nr ) // it is an IPI 148 148 { 149 assert( (index == core->lid) , "illegal IPI index" );149 assert( __FUNCTION__, (index == core->lid) , "illegal IPI index" ); 150 150 151 151 #if DEBUG_HAL_IRQS … … 230 230 index = pti_status - 1; 231 231 232 assert( (index == core->lid) , "unconsistent PTI index\n");232 assert( __FUNCTION__, (index == core->lid) , "unconsistent PTI index\n"); 233 233 234 234 #if DEBUG_HAL_IRQS … … 319 319 } 320 320 321 assert( (cluster_ext_ptr != NULL) , "cannot allocate memory for cluster extension");321 assert( __FUNCTION__, (cluster_ext_ptr != NULL) , "cannot allocate memory for cluster extension"); 322 322 323 323 // get XCU characteristics from the XCU config register … … 381 381 382 382 if( (func == DEV_FUNC_IOC && impl == IMPL_IOC_BDV) || (func == DEV_FUNC_NIC) || 383 (func == DEV_FUNC_TXT && impl == IMPL_TXT_TTY) || (func == DEV_FUNC_IOB) ) 383 (func == DEV_FUNC_TXT && impl == IMPL_TXT_TTY) || (func == DEV_FUNC_IOB) ) // external IRQ => WTI 384 384 { 385 385 // get external IRQ index 386 uint32_t hwi_id ;386 uint32_t hwi_id = 0; 387 387 if ( func == DEV_FUNC_IOC ) hwi_id = iopic_input.ioc[channel]; 388 388 else if( func == DEV_FUNC_TXT && is_rx ) hwi_id = iopic_input.txt_rx[channel]; … … 391 391 else if( (func == DEV_FUNC_NIC) && !is_rx ) hwi_id = iopic_input.nic_tx[channel]; 392 392 else if( func == DEV_FUNC_IOB ) hwi_id = iopic_input.iob; 393 else assert( false , "illegal device functionnal type\n");393 else assert( __FUNCTION__, false , "illegal device functionnal type\n"); 394 394 395 395 // get a WTI mailbox from local XCU descriptor … … 453 453 else 454 454 { 455 assert( false , "illegal device functionnal type\n" );455 assert( __FUNCTION__, false , "illegal device functionnal type\n" ); 456 456 } 457 457 } // end soclib_pic_bind_irq(); … … 488 488 else 489 489 { 490 assert( false , "illegal IRQ type\n" );490 assert( __FUNCTION__, false , "illegal IRQ type\n" ); 491 491 } 492 492 } // end soclib_pic_enable_irq() … … 523 523 else 524 524 { 525 assert( false , "illegal IRQ type\n" );525 assert( __FUNCTION__, false , "illegal IRQ type\n" ); 526 526 } 527 527 } // end soclib_pic_enable_irq() -
trunk/hal/tsar_mips32/drivers/soclib_sdc.c
r619 r679 36 36 static void _sdc_enable(sdcard_dev_t *sdcard) 37 37 { 38 spi_ss_assert( sdcard->spi, sdcard->slave_id);38 spi_ss_assert( __FUNCTION__,sdcard->spi, sdcard->slave_id); 39 39 } 40 40 … … 44 44 static void _sdc_disable(sdcard_dev_t *sdcard) 45 45 { 46 spi_ss_deassert( sdcard->spi, sdcard->slave_id);46 spi_ss_deassert( __FUNCTION__,sdcard->spi, sdcard->slave_id); 47 47 } 48 48 … … 375 375 if (++iter >= SDCARD_RESET_ITER_MAX) 376 376 { 377 assert( false, __FUNCTION__, "\n[SDC ERROR] During SD card reset / card response = %x \n", sdcard_rsp);377 assert( __FUNCTION__, false, __FUNCTION__, "\n[SDC ERROR] During SD card reset / card response = %x \n", sdcard_rsp); 378 378 } 379 379 } … … 383 383 if (sdcard_rsp) 384 384 { 385 assert( false, __FUNCTION__, "[SDC ERROR] During SD card block size initialization\n");385 assert( __FUNCTION__, false, __FUNCTION__, "[SDC ERROR] During SD card block size initialization\n"); 386 386 } 387 387 … … 465 465 else // write access 466 466 { 467 assert( false, __FUNCTION__, "[SDC ERROR] function _sdc_write() not iplemented yet\n");467 assert( __FUNCTION__, false, __FUNCTION__, "[SDC ERROR] function _sdc_write() not iplemented yet\n"); 468 468 } 469 469 } // _end sdc_access() … … 474 474 void __attribute__ ((noinline)) soclib_sdc_isr( chdev_t * chdev ) 475 475 { 476 assert( false, __FUNCTION__, "\n[GIET ERROR] _sdc_isr() not implemented\n");476 assert( __FUNCTION__, false, __FUNCTION__, "\n[GIET ERROR] _sdc_isr() not implemented\n"); 477 477 } 478 478 -
trunk/hal/tsar_mips32/drivers/soclib_spi.c
r619 r679 197 197 198 198 /////////////////////////////////////////////////////////////////////////////// 199 // spi_ss_assert( )199 // spi_ss_assert( __FUNCTION__,) 200 200 // This function enables a SPI slave 201 201 // - spi : initialized pointer to the SPI controller 202 202 // - index : slave index 203 203 /////////////////////////////////////////////////////////////////////////////// 204 void spi_ss_assert( struct spi_dev * spi, int index)204 void spi_ss_assert( __FUNCTION__,struct spi_dev * spi, int index) 205 205 { 206 206 unsigned int spi_ss = ioread32(&spi->ss); … … 210 210 211 211 /////////////////////////////////////////////////////////////////////////////// 212 // spi_ss_deassert( )212 // spi_ss_deassert( __FUNCTION__,) 213 213 // This function disables a SPI slave 214 214 // - spi : initialized pointer to the SPI controller 215 215 // - index : slave index 216 216 /////////////////////////////////////////////////////////////////////////////// 217 void spi_ss_deassert( struct spi_dev * spi, int index)217 void spi_ss_deassert( __FUNCTION__,struct spi_dev * spi, int index) 218 218 { 219 219 unsigned int spi_ss = ioread32(&spi->ss); -
trunk/hal/tsar_mips32/drivers/soclib_tty.c
r658 r679 243 243 else 244 244 { 245 assert( false , "illegal TXT command\n" );245 assert( __FUNCTION__, false , "illegal TXT command\n" ); 246 246 } 247 247 … … 338 338 339 339 // check process exist 340 assert( (owner_xp != XPTR_NULL) ,340 assert( __FUNCTION__, (owner_xp != XPTR_NULL) , 341 341 "TXT owner process not found\n" ); 342 342 … … 347 347 348 348 // TXT owner cannot be the INIT process 349 assert( (owner_pid != 1) , "INIT process cannot be the TXT owner" );349 assert( __FUNCTION__, (owner_pid != 1) , "INIT process cannot be the TXT owner" ); 350 350 351 351 // get parent process descriptor pointers … … 390 390 391 391 // check process exist 392 assert( (owner_xp != XPTR_NULL) , "TXT owner process not found\n" );392 assert( __FUNCTION__, (owner_xp != XPTR_NULL) , "TXT owner process not found\n" ); 393 393 394 394 // get relevant infos on TXT owner process … … 398 398 399 399 // TXT owner cannot be the INIT process 400 assert( (owner_pid != 1) , "INIT process cannot be the TXT owner" );400 assert( __FUNCTION__, (owner_pid != 1) , "INIT process cannot be the TXT owner" ); 401 401 402 402 #if DEBUG_HAL_TXT_RX
Note: See TracChangeset
for help on using the changeset viewer.