<!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-07)</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>
<font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-03-07 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1756/bsps
* timer/timer.c: Retry on timer calibration loop failure.
</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.192.2.6&r2=text&tr2=1.192.2.7&diff_format=h">M</a></td><td width='1%'>1.192.2.7</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/ChangeLog.diff?r1=text&tr1=1.257.2.1&r2=text&tr2=1.257.2.2&diff_format=h">M</a></td><td width='1%'>1.257.2.2</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.27.2.1&r2=text&tr2=1.27.2.2&diff_format=h">M</a></td><td width='1%'>1.27.2.2</td><td width='100%'>c/src/lib/libbsp/i386/pc386/timer/timer.c</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.29&r2=text&tr2=1.29.2.1&diff_format=h">M</a></td><td width='1%'>1.29.2.1</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.192.2.6 rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.192.2.7
--- rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.192.2.6 Tue Nov 23 12:41:53 2010
+++ rtems/c/src/lib/libbsp/i386/pc386/ChangeLog Mon Mar 7 11:36:01 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-03-07 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1756/bsps
+ * timer/timer.c: Retry on timer calibration loop failure.
+
</font> 2010-11-23 Joel Sherrill <joel.sherrilL@OARcorp.com>
* Makefile.am, preinstall.am: Add <bsp/tty_drv.h> to the set of
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.257.2.1 rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.257.2.2
--- rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.257.2.1 Wed Feb 2 09:14:39 2011
+++ rtems/c/src/lib/libbsp/i386/pc386/ChangeLog Mon Mar 7 11:35:52 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-03-07 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1756/bsps
+ * timer/timer.c: Retry on timer calibration loop failure.
+
</font> 2011-02-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require autoconf-2.68, automake-1.11.1.
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.27.2.1 rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.27.2.2
--- rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.27.2.1 Wed Dec 3 11:28:30 2008
+++ rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c Mon Mar 7 11:36:01 2011
</font><font color='#997700'>@@ -385,13 +385,20 @@
</font> unsigned int targetClockBits, currentClockBits;
unsigned int slowLoopGranularity, fastLoopGranularity;
rtems_interrupt_level level;
<font color='#000088'>+ int retries = 0;
+<span style="background-color: #FF0000"> </span>
+ rtems_interrupt_disable(level);
</font>
<font color='#880000'>-#ifdef DEBUG_CALIBRATE
- printk( "Calibrate_loop_1ms is starting, please wait ( but not too loooong. )\n" );
-#endif
</font><font color='#000088'>+retry:
+ if ( ++retries >= 5 ) {
+ printk( "Calibrate_loop_1ms: too many attempts. giving up!!\n" );
+ while (1);
+ }
+ #ifdef DEBUG_CALIBRATE
+ printk("Calibrate_loop_1ms is starting, please wait (but not too long.)\n");
+ #endif
</font> 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'>@@ -435,8 +442,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'>@@ -446,14 +456,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;
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.29 rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.29.2.1
--- rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c:1.29 Sun May 9 19:29:30 2010
+++ rtems/c/src/lib/libbsp/i386/pc386/timer/timer.c Mon Mar 7 11:35:52 2011
</font><font color='#997700'>@@ -333,13 +333,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'>@@ -383,8 +389,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'>@@ -394,14 +403,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>