Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2006 20:32:35 -0800
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        multimedia@FreeBSD.org
Subject:   extra DELAYs in bktr_i2c.c
Message-ID:  <20061211043235.GA781@funkthat.com>

next in thread | raw e-mail | index | archive | help

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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."

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bktr_i2c.patch"

==== //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;
 }

--J2SCkAp4GZ/dPZZf--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061211043235.GA781>