<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-03-04)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-03-04 Joel Sherrill <joel.sherrilL@OARcorp.com>
* timer/timer.c: Retry up to 5 times when the calibration loop fails.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/i386/pc386/ChangeLog.diff?r1=text&tr1=1.268&r2=text&tr2=1.269&diff_format=h">M</a></td><td width='1%'>1.269</td><td width='100%'>c/src/lib/libbsp/i386/pc386/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c.diff?r1=text&tr1=1.32&r2=text&tr2=1.33&diff_format=h">M</a></td><td width='1%'>1.33</td><td width='100%'>c/src/lib/libbsp/i386/pc386/timer/timer.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.268 rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.269
--- rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.268 Fri Feb 11 06:04:30 2011
+++ rtems/c/src/lib/libbsp/i386/pc386/ChangeLog Fri Mar 4 15:56:44 2011
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2011-03-04 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ * timer/timer.c: Retry up to 5 times when the calibration loop fails.
+
</font> 2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* include/bsp.h, include/tm27.h:
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.32 rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.33
--- rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.32 Wed Feb 9 02:22:58 2011
+++ rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c Fri Mar 4 15:56:45 2011
</font><font color='#997700'>@@ -334,13 +334,19 @@
</font> unsigned int targetClockBits, currentClockBits;
unsigned int slowLoopGranularity, fastLoopGranularity;
rtems_interrupt_level level;
<font color='#000088'>+ int retries = 0;
</font>
<font color='#000088'>+ rtems_interrupt_disable(level);
+
+retry:
+ if ( ++retries >= 5 ) {
+ printk( "Calibrate_loop_1ms: too many attempts. giving up!!\n" );
+ while (1);
+ }
</font> #ifdef DEBUG_CALIBRATE
printk("Calibrate_loop_1ms is starting, please wait (but not too long.)\n");
#endif
targetClockBits = US_TO_TICK(1000);
<font color='#880000'>-
- rtems_interrupt_disable(level);
</font> /*
* Fill up the cache to get a correct offset
*/
<font color='#997700'>@@ -384,8 +390,11 @@
</font> fastLoop (10000);
res = readTimer0() - offset;
if (res < emptyCall) {
<font color='#880000'>- printk("Problem #1 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
</font><font color='#000088'>+ printk(
+ "Problem #1 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
</font> }
fastLoopGranularity = (res - emptyCall) / 10000;
/*
<font color='#997700'>@@ -395,14 +404,20 @@
</font> slowLoop(10);
res = readTimer0();
if (res < offset + emptyCall) {
<font color='#880000'>- printk("Problem #2 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
</font><font color='#000088'>+ printk(
+ "Problem #2 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
</font> }
slowLoopGranularity = (res - offset - emptyCall)/ 10;
if (slowLoopGranularity == 0) {
<font color='#880000'>- printk("Problem #3 in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
</font><font color='#000088'>+ printk(
+ "Problem #3 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
</font> }
targetClockBits += offset;
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>