added small delay between outputting clock and data signals on I2C buses to prevent possible read-modify-write errors. hopefully fixes ticket #4084.. bumped driverversion to 0.95.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32478 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2009-08-17 19:24:54 +00:00
parent 541dd9330e
commit 203116954e
2 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/* Authors:
Mark Watson 12/1999,
Apsed,
Rudolf Cornelissen 10/2002-6/2009
Rudolf Cornelissen 10/2002-8/2009
tst..
*/
@ -92,7 +92,7 @@ status_t nv_general_powerup()
{
status_t status;
LOG(1,("POWERUP: Haiku nVidia Accelerant 0.94 running.\n"));
LOG(1,("POWERUP: Haiku nVidia Accelerant 0.95 running.\n"));
/* log VBLANK INT usability status */
if (si->ps.int_assigned)

View File

@ -2,7 +2,7 @@
* i2c interface.
* Bus should be run at max. 100kHz: see original Philips I2C specification
*
* Rudolf Cornelissen 12/2002-6/2009
* Rudolf Cornelissen 12/2002-8/2009
*/
#define MODULE_BIT 0x00004000
@ -323,11 +323,13 @@ status_t i2c_init(void)
/* check for hardware coupling of SCL and SDA -out and -in lines */
snooze(6);
OutSCL(bus, false);
snooze(3);
OutSDA(bus, true);
snooze(3);
if (InSCL(bus) || !InSDA(bus)) continue;
snooze(3);
OutSCL(bus, true);
snooze(3);
OutSDA(bus, false);
snooze(3);
if (!InSCL(bus) || InSDA(bus)) continue;
@ -535,6 +537,10 @@ set_signals(void *cookie, int clk, int data)
else
OutSCL(info->port, false);
/* waiting for SCL output to become stable before reading it back.
* ('typical' error-prone read-modify-write situation..) */
snooze(3);
if (data)
OutSDA(info->port, true);
else