]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2004-04-12 04:55:59 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Mon, 12 Apr 2004 04:56:00 +0000 (04:56 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Mon, 12 Apr 2004 04:56:00 +0000 (04:56 +0000)
emitted a BIG FAT WARNING if msr.h could not be found (and therefore
the gettimeofday() delay loop would be used)

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@415 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

debug.h
lcd4linux.conf.sample
udelay.c

diff --git a/debug.h b/debug.h
index 3bdfde9d2d1541c8693ef916b39ed43a17b66cd9..f730cb23d3d62897f266e77299c9567a9fa4e79f 100644 (file)
--- a/debug.h
+++ b/debug.h
@@ -1,4 +1,4 @@
-/* $Id: debug.h,v 1.6 2003/10/05 17:58:50 reinelt Exp $
+/* $Id: debug.h,v 1.7 2004/04/12 04:55:59 reinelt Exp $
  *
  * debug messages
  *
  *
  *
  * $Log: debug.h,v $
+ * Revision 1.7  2004/04/12 04:55:59  reinelt
+ * emitted a BIG FAT WARNING if msr.h could not be found (and therefore
+ * the gettimeofday() delay loop would be used)
+ *
  * Revision 1.6  2003/10/05 17:58:50  reinelt
  * libtool junk; copyright messages cleaned up
  *
@@ -61,7 +65,7 @@ extern int verbose_level;
 void message (int level, const char *format, ...);
 
 #define debug(args...) message (2, __FILE__ ": " args)
-#define info(args...) message (1, args)
+#define info(args...)  message (1, args)
 #define error(args...) message (0, args)
 
 #endif
index 543ce1816c954ce1e72e34069eae74767e949a90..936780582396ae54c868cc192ca687461a263509 100644 (file)
@@ -457,9 +457,9 @@ Layout testMySQL {
 
 
 #Display 'LK204'
-#Display 'HD44780-20x4'
+Display 'HD44780-20x4'
 #Display 'M50530-24x8'
-Display 'CF631'
+#Display 'CF631'
 #Display 'CF632'
 #Display 'CF633'
 #Display 'USBLCD'
index d728039f8375d0764a8254c06a00e5895b575c20..293b7d0aabcf1f0e39a8fcb66be95ea0cab1172b 100644 (file)
--- a/udelay.c
+++ b/udelay.c
@@ -1,4 +1,4 @@
-/* $Id: udelay.c,v 1.14 2003/10/12 04:46:19 reinelt Exp $
+/* $Id: udelay.c,v 1.15 2004/04/12 04:56:00 reinelt Exp $
  *
  * short delays
  *
  *
  *
  * $Log: udelay.c,v $
+ * Revision 1.15  2004/04/12 04:56:00  reinelt
+ * emitted a BIG FAT WARNING if msr.h could not be found (and therefore
+ * the gettimeofday() delay loop would be used)
+ *
  * Revision 1.14  2003/10/12 04:46:19  reinelt
  *
  *
@@ -206,26 +210,26 @@ static void getCPUinfo (int *hasTSC, double *MHz)
 
   p=strstr(buffer, "flags");
   if (p==NULL) {
-    debug ("/proc/cpuinfo has no 'flags' line");
+    info ("/proc/cpuinfo has no 'flags' line");
   } else {
     p=strstr(p, "tsc");
     if (p==NULL) {
-      debug ("CPU does not support Time Stamp Counter");
+      info ("CPU does not support Time Stamp Counter");
     } else {
-      debug ("CPU supports Time Stamp Counter");
+      info ("CPU supports Time Stamp Counter");
       *hasTSC=1;
     }
   }
   
   p=strstr(buffer, "cpu MHz");
   if (p==NULL) {
-    debug ("/proc/cpuinfo has no 'cpu MHz' line");
+    info ("/proc/cpuinfo has no 'cpu MHz' line");
   } else {
     if (sscanf(p+7, " : %lf", MHz)!=1) {
       error ("parse(/proc/cpuinfo) failed: unknown 'cpu MHz' format");
       *MHz=-1;
     } else {
-      debug ("CPU runs at %f MHz", *MHz);
+      info ("CPU runs at %f MHz", *MHz);
     }
   }
 
@@ -243,14 +247,17 @@ void udelay_init (void)
   
   if (tsc && mhz>0.0) {
     ticks_per_usec=ceil(mhz);
-    debug ("using TSC delay loop, %u ticks per microsecond", ticks_per_usec);
+    info ("using TSC delay loop, %u ticks per microsecond", ticks_per_usec);
   } else
-
+#else
+    error ("/usr/include/asm/msr.h was missing at compile time.");
+    error ("Even if your CPU supports TSC, it will not be used.");
+    error ("You *really* should recompile LCD4linux with msr.h.");
 #endif
 
  {
     ticks_per_usec=0;
-    debug ("using gettimeofday() delay loop");
+    info ("using gettimeofday() delay loop");
   }
 }