From c55e7c91f86ad9cc5235b79f31108d1d53810d80 Mon Sep 17 00:00:00 2001 From: reinelt Date: Mon, 12 Apr 2004 04:56:00 +0000 Subject: [lcd4linux @ 2004-04-12 04:55:59 by reinelt] 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 | 8 ++++++-- lcd4linux.conf.sample | 4 ++-- udelay.c | 25 ++++++++++++++++--------- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/debug.h b/debug.h index 3bdfde9..f730cb2 100644 --- 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 * @@ -22,6 +22,10 @@ * * * $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 diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample index 543ce18..9367805 100644 --- a/lcd4linux.conf.sample +++ b/lcd4linux.conf.sample @@ -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' diff --git a/udelay.c b/udelay.c index d728039..293b7d0 100644 --- 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 * @@ -22,6 +22,10 @@ * * * $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"); } } -- cgit v1.2.3