- Timestamp:
- 03/04/11 21:56:45 (13 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 6311805
- Parents:
- bd0ebc3
- Location:
- c/src/lib/libbsp/i386/pc386
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/i386/pc386/ChangeLog
rbd0ebc3 r13e4ab64 1 2011-03-04 Joel Sherrill <joel.sherrilL@OARcorp.com> 2 3 * timer/timer.c: Retry up to 5 times when the calibration loop fails. 4 1 5 2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org> 2 6 -
c/src/lib/libbsp/i386/pc386/timer/timer.c
rbd0ebc3 r13e4ab64 335 335 unsigned int slowLoopGranularity, fastLoopGranularity; 336 336 rtems_interrupt_level level; 337 337 int retries = 0; 338 339 rtems_interrupt_disable(level); 340 341 retry: 342 if ( ++retries >= 5 ) { 343 printk( "Calibrate_loop_1ms: too many attempts. giving up!!\n" ); 344 while (1); 345 } 338 346 #ifdef DEBUG_CALIBRATE 339 347 printk("Calibrate_loop_1ms is starting, please wait (but not too long.)\n"); 340 348 #endif 341 349 targetClockBits = US_TO_TICK(1000); 342 343 rtems_interrupt_disable(level);344 350 /* 345 351 * Fill up the cache to get a correct offset … … 385 391 res = readTimer0() - offset; 386 392 if (res < emptyCall) { 387 printk("Problem #1 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n"); 388 while (1); 393 printk( 394 "Problem #1 in offset computation in Calibrate_loop_1ms " 395 " in file libbsp/i386/pc386/timer/timer.c\n" 396 ); 397 goto retry; 389 398 } 390 399 fastLoopGranularity = (res - emptyCall) / 10000; … … 396 405 res = readTimer0(); 397 406 if (res < offset + emptyCall) { 398 printk("Problem #2 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n"); 399 while (1); 407 printk( 408 "Problem #2 in offset computation in Calibrate_loop_1ms " 409 " in file libbsp/i386/pc386/timer/timer.c\n" 410 ); 411 goto retry; 400 412 } 401 413 slowLoopGranularity = (res - offset - emptyCall)/ 10; 402 414 403 415 if (slowLoopGranularity == 0) { 404 printk("Problem #3 in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n"); 405 while (1); 416 printk( 417 "Problem #3 in offset computation in Calibrate_loop_1ms " 418 " in file libbsp/i386/pc386/timer/timer.c\n" 419 ); 420 goto retry; 406 421 } 407 422
Note: See TracChangeset
for help on using the changeset viewer.