change log for rtems (2011-03-07)
rtems-vc at rtems.org
rtems-vc at rtems.org
Mon Mar 7 18:10:20 UTC 2011
*joel* (on branch rtems-4-10-branch):
2011-03-07 Joel Sherrill <joel.sherrilL at OARcorp.com>
PR 1756/bsps
* timer/timer.c: Retry on timer calibration loop failure.
M 1.192.2.7 c/src/lib/libbsp/i386/pc386/ChangeLog
M 1.257.2.2 c/src/lib/libbsp/i386/pc386/ChangeLog
M 1.27.2.2 c/src/lib/libbsp/i386/pc386/timer/timer.c
M 1.29.2.1 c/src/lib/libbsp/i386/pc386/timer/timer.c
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
@@ -1,3 +1,8 @@
+2011-03-07 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+ PR 1756/bsps
+ * timer/timer.c: Retry on timer calibration loop failure.
+
2010-11-23 Joel Sherrill <joel.sherrilL at OARcorp.com>
* Makefile.am, preinstall.am: Add <bsp/tty_drv.h> to the set of
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
@@ -1,3 +1,8 @@
+2011-03-07 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+ PR 1756/bsps
+ * timer/timer.c: Retry on timer calibration loop failure.
+
2011-02-02 Ralf Corsépius <ralf.corsepius at rtems.org>
* configure.ac: Require autoconf-2.68, automake-1.11.1.
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
@@ -385,13 +385,20 @@
unsigned int targetClockBits, currentClockBits;
unsigned int slowLoopGranularity, fastLoopGranularity;
rtems_interrupt_level level;
+ int retries = 0;
+
+ rtems_interrupt_disable(level);
-#ifdef DEBUG_CALIBRATE
- printk( "Calibrate_loop_1ms is starting, please wait ( but not too loooong. )\n" );
-#endif
+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
targetClockBits = US_TO_TICK(1000);
- rtems_interrupt_disable(level);
/*
* Fill up the cache to get a correct offset
*/
@@ -435,8 +442,11 @@
fastLoop (10000);
res = readTimer0() - offset;
if (res < emptyCall) {
- printk("Problem #1 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
+ printk(
+ "Problem #1 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
}
fastLoopGranularity = (res - emptyCall) / 10000;
/*
@@ -446,14 +456,20 @@
slowLoop(10);
res = readTimer0();
if (res < offset + emptyCall) {
- printk("Problem #2 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
+ printk(
+ "Problem #2 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
}
slowLoopGranularity = (res - offset - emptyCall)/ 10;
if (slowLoopGranularity == 0) {
- printk("Problem #3 in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
+ printk(
+ "Problem #3 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
}
targetClockBits += offset;
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
@@ -333,13 +333,19 @@
unsigned int targetClockBits, currentClockBits;
unsigned int slowLoopGranularity, fastLoopGranularity;
rtems_interrupt_level level;
+ int retries = 0;
+ rtems_interrupt_disable(level);
+
+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
targetClockBits = US_TO_TICK(1000);
-
- rtems_interrupt_disable(level);
/*
* Fill up the cache to get a correct offset
*/
@@ -383,8 +389,11 @@
fastLoop (10000);
res = readTimer0() - offset;
if (res < emptyCall) {
- printk("Problem #1 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
+ printk(
+ "Problem #1 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
}
fastLoopGranularity = (res - emptyCall) / 10000;
/*
@@ -394,14 +403,20 @@
slowLoop(10);
res = readTimer0();
if (res < offset + emptyCall) {
- printk("Problem #2 in offset computation in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
+ printk(
+ "Problem #2 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
}
slowLoopGranularity = (res - offset - emptyCall)/ 10;
if (slowLoopGranularity == 0) {
- printk("Problem #3 in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
- while (1);
+ printk(
+ "Problem #3 in offset computation in Calibrate_loop_1ms "
+ " in file libbsp/i386/pc386/timer/timer.c\n"
+ );
+ goto retry;
}
targetClockBits += offset;
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110307/3f6bc2a9/attachment-0001.html>
More information about the vc
mailing list