extra DELAYs in bktr_i2c.c

John-Mark Gurney gurney_j at resnet.uoregon.edu
Sun Dec 10 20:32:37 PST 2006


In 2002, delays were added to iicbb.c to control the speed of the
SDA and SCL lines, but their respective delays were not removed from
bktr_i2c.c...  This changes the tuning speed for my FusionHDTV5 Lite
from over 2 seconds down to .4 seconds, and checking if we are tuned
from ~.7 seconds to .14 seconds...  Please test this is you are using
the BKTR_USE_FREEBSD_SMBUS option?

The next stage is to turn the delays in iicbb to be configurable so
that we can change from 10us DELAYs (100khz), to 3us DELAYs (333khz)...

Most things support 400khz these days, and that'd reduce the speeds
even more...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
-------------- next part --------------
==== //depot/vendor/freebsd/src/sys/dev/bktr/bktr_i2c.c#10 - /home/jmg/p4/world/src/sys/dev/bktr/bktr_i2c.c ====
--- /tmp/tmp.1115.0	Sun Dec 10 20:22:45 2006
+++ /home/jmg/p4/world/src/sys/dev/bktr/bktr_i2c.c	Sun Dec 10 19:47:32 2006
@@ -50,7 +50,6 @@
 #endif
 
 #if (__FreeBSD_version < 500000)
-#include <machine/clock.h>              /* for DELAY */
 #include <pci/pcivar.h>
 #include <pci/pcireg.h>
 #else
@@ -69,8 +68,6 @@
 #include <dev/smbus/smbconf.h>
 #include <dev/iicbus/iiconf.h>
 
-#define I2C_DELAY	40
-
 /* Compilation is void if BKTR_USE_FREEBSD_SMBUS is not
  * defined. This allows bktr owners to have smbus active for there
  * motherboard and still use their bktr without smbus.
@@ -205,8 +202,6 @@
 	else
 		OUTL(sc, BKTR_I2C_DATA_CTL, clock);
 
-	DELAY(I2C_DELAY);
-
 	return;
 }
 
@@ -221,8 +216,6 @@
 		OUTL(sc, BKTR_I2C_DATA_CTL, 0x2 | data);
 	else
 		OUTL(sc, BKTR_I2C_DATA_CTL, data);
-
-	DELAY(I2C_DELAY);
 
 	return;
 }


More information about the freebsd-multimedia mailing list