-/* $Id: drv_generic_parport.c,v 1.4 2004/03/03 04:44:16 reinelt Exp $
+/* $Id: drv_generic_parport.c,v 1.5 2004/04/12 05:14:42 reinelt Exp $
*
* generic driver helper for serial and parport access
*
*
*
* $Log: drv_generic_parport.c,v $
+ * Revision 1.5 2004/04/12 05:14:42 reinelt
+ * another BIG FAT WARNING on the use of raw ports instead of ppdev
+ *
* Revision 1.4 2004/03/03 04:44:16 reinelt
* changes (cosmetics?) to the big patch from Martin
* hash patch un-applied
udelay_init();
+#ifndef WITH_PPDEV
+ error ("The files include/linux/parport.h and/or include/linux/ppdev.h");
+ error ("were missing at compile time. Even if your system supports");
+ error ("ppdev, it will not be used.");
+ error ("You *really* should install these files and recompile LCD4linux!");
+#endif
+
s=cfg_get (Section, "Port", NULL);
if (s==NULL || *s=='\0') {
error ("%s: no '%s.Port' entry from %s", Driver, Section, cfg_source());
return -1;
}
+
PPdev=NULL;
if ((Port=strtol(s, &e, 0))==0 || *e!='\0') {
#ifdef WITH_PPDEV
Port=0;
PPdev=s;
#else
- free(s);
error ("%s: bad %s.Port '%s' from %s", Driver, Section, s, cfg_source());
+ free(s);
return -1;
#endif
}
#ifdef WITH_PPDEV
if (PPdev) {
- debug ("using ppdev %s", PPdev);
+ info ("using ppdev %s", PPdev);
PPfd=open(PPdev, O_RDWR);
if (PPfd==-1) {
error ("%s: open(%s) failed: %s", Driver, PPdev, strerror(errno));
#endif
{
- debug ("using raw port 0x%x", Port);
+ error ("using raw port 0x%x (deprecated!)", Port);
+ error ("You *really* should change your setup and use ppdev!");
if ((Port+3)<=0x3ff) {
if (ioperm(Port, 3, 1)!=0) {
error ("%s: ioperm(0x%x) failed: %s", Driver, Port, strerror(errno));
-/* $Id: udelay.c,v 1.15 2004/04/12 04:56:00 reinelt Exp $
+/* $Id: udelay.c,v 1.16 2004/04/12 05:14:42 reinelt Exp $
*
* short delays
*
*
*
* $Log: udelay.c,v $
+ * Revision 1.16 2004/04/12 05:14:42 reinelt
+ * another BIG FAT WARNING on the use of raw ports instead of ppdev
+ *
* 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)
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.");
+ error ("The file '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 install msr.h and recompile LCD4linux!");
#endif
{