comparison packages/hal/mips/arch/current/src/hal_misc.c @ 76:435cced73e2f ecos-v1_3_1-release

eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
author jlarmour
date Tue, 28 Mar 2000 14:10:45 +0000
parents bf00f99aec69
children c37d3a9e1b28
comparison
equal deleted inserted replaced
75:41bf073c0c32 76:435cced73e2f
275 275
276 #include <cyg/infra/diag.h> 276 #include <cyg/infra/diag.h>
277 277
278 void hal_idle_thread_action( cyg_uint32 count ) 278 void hal_idle_thread_action( cyg_uint32 count )
279 { 279 {
280 #if 0 //def CYG_HAL_MIPS_SIM 280 #if 0 //def CYGPKG_HAL_MIPS_SIM
281 if( (count % 1000) == 0 ) 281 if( (count % 1000) == 0 )
282 { 282 {
283 // This code causes a fake interrupt. 283 // This code causes a fake interrupt.
284 asm volatile ( 284 asm volatile (
285 "xor $24,$24,$24;" 285 "xor $24,$24,$24;"
293 : 293 :
294 : "t8", "t9" 294 : "t8", "t9"
295 ); 295 );
296 } 296 }
297 #endif 297 #endif
298 #if 0 //def CYG_HAL_MIPS_JMR3904 298 #if 0 //def CYGPKG_HAL_MIPS_TX39_JMR3904
299 299
300 if( (count % 100000 ) == 0 ) 300 if( (count % 100000 ) == 0 )
301 { 301 {
302 // cyg_uint32 tval, isr, imr, ilr; 302 // cyg_uint32 tval, isr, imr, ilr;
303 cyg_uint32 sr = 0, cr = 0, ctr = 0, cpr = 0; 303 cyg_uint32 sr = 0, cr = 0, ctr = 0, cpr = 0;
394 394
395 // if( count >= 10 ) 395 // if( count >= 10 )
396 // for(;;); 396 // for(;;);
397 } 397 }
398 #endif 398 #endif
399 #if 0
400 {
401 static CYG_WORD32 istat[3] = { 0xffffffff,0xffffffff,0xffffffff };
402 int i;
403 for( i = 0; i < 3; i++ )
404 {
405 CYG_WORD32 reg, sr;
406 HAL_READ_UINT32( CYGHWR_HAL_MIPS_VRC4373_INTC_STAT0 + i * CYGHWR_HAL_MIPS_VRC4373_INTC_MASK_OFF, reg );
407 if( reg != istat[i] )
408 {
409 hal_diag_ai_write_char('~');
410 hal_diag_ai_write_char('0'+i);
411 hal_diag_ai_write_hex8( reg );
412 istat[i] = reg;
413 HAL_READ_UINT32( CYGHWR_HAL_MIPS_VRC4373_INTC_MASK0 + i * CYGHWR_HAL_MIPS_VRC4373_INTC_MASK_OFF, reg );
414 hal_diag_ai_write_char('.');
415 hal_diag_ai_write_hex8( reg );
416 #if 0
417 asm volatile (
418 "mfc0 %0,$12;"
419 "nop; nop; nop;"
420 : "=r"(sr)
421 );
422 hal_diag_ai_write_char('.');
423 hal_diag_ai_write_hex8( sr );
424 #endif
425 }
426 }
427 }
428 {
429 static CYG_WORD32 old_pins = 0;
430 CYG_WORD32 reg;
431 HAL_READ_UINT32( CYGHWR_HAL_MIPS_VRC4373_INTC_PINS, reg );
432 if( reg != old_pins )
433 {
434 hal_diag_ai_write_char('%');
435 hal_diag_ai_write_hex8( reg );
436 old_pins = reg;
437 }
438 }
439 #endif
440 #if 0 //def CYGPKG_HAL_MIPS_VR4300_VRC4373
441
442 // Wiggle one of the leds to show we are running
443
444 if( (count % 50000 ) == 0 )
445 {
446 cyg_uint8 lr;
447 { int i; for( i = 0; i < 200; i++ ); }
448 HAL_READ_UINT8( 0xc2000008, lr );
449 lr ^= 2;
450 { int i; for( i = 0; i < 200; i++ ); }
451 HAL_WRITE_UINT8( 0xc2000008, lr );
452
453 }
454 #endif
399 } 455 }
400 456
401 /*------------------------------------------------------------------------*/ 457 /*------------------------------------------------------------------------*/
402 /* End of hal_misc.c */ 458 /* End of hal_misc.c */