[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
This commit is contained in:
reinelt
2004-04-12 04:56:00 +00:00
parent 75c3c113e9
commit c55e7c91f8
3 changed files with 24 additions and 13 deletions
+6 -2
View File
@@ -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
+2 -2
View 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'
+16 -9
View File
@@ -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");
}
}