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:
@@ -1,7 +1,7 @@
|
|||||||
/* Authors:
|
/* Authors:
|
||||||
Mark Watson 12/1999,
|
Mark Watson 12/1999,
|
||||||
Apsed,
|
Apsed,
|
||||||
Rudolf Cornelissen 10/2002-6/2009
|
Rudolf Cornelissen 10/2002-8/2009
|
||||||
tst..
|
tst..
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ status_t nv_general_powerup()
|
|||||||
{
|
{
|
||||||
status_t status;
|
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 */
|
/* log VBLANK INT usability status */
|
||||||
if (si->ps.int_assigned)
|
if (si->ps.int_assigned)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* i2c interface.
|
* i2c interface.
|
||||||
* Bus should be run at max. 100kHz: see original Philips I2C specification
|
* 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
|
#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 */
|
/* check for hardware coupling of SCL and SDA -out and -in lines */
|
||||||
snooze(6);
|
snooze(6);
|
||||||
OutSCL(bus, false);
|
OutSCL(bus, false);
|
||||||
|
snooze(3);
|
||||||
OutSDA(bus, true);
|
OutSDA(bus, true);
|
||||||
snooze(3);
|
snooze(3);
|
||||||
if (InSCL(bus) || !InSDA(bus)) continue;
|
if (InSCL(bus) || !InSDA(bus)) continue;
|
||||||
snooze(3);
|
snooze(3);
|
||||||
OutSCL(bus, true);
|
OutSCL(bus, true);
|
||||||
|
snooze(3);
|
||||||
OutSDA(bus, false);
|
OutSDA(bus, false);
|
||||||
snooze(3);
|
snooze(3);
|
||||||
if (!InSCL(bus) || InSDA(bus)) continue;
|
if (!InSCL(bus) || InSDA(bus)) continue;
|
||||||
@@ -535,6 +537,10 @@ set_signals(void *cookie, int clk, int data)
|
|||||||
else
|
else
|
||||||
OutSCL(info->port, false);
|
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)
|
if (data)
|
||||||
OutSDA(info->port, true);
|
OutSDA(info->port, true);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user