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