Hello,
I found the reason why the i2c is on the phone so slow.
The phone uses the driver i2c-s3c2410.c
And after each acces to i2c there is the function msleep(1).
Which needs on the openmoko about 10ms.
I made a little patch for that and now i2c is quite fast.
Maybe that should help someone. One I2C-Access needs now about ~0.6ms
and before it was 10ms.
I attached the patch.
Kind regards,
Matthias Katzengruber
Index: linux-2.6.24/drivers/i2c/busses/i2c-s3c2410.c
===================================================================
--- linux-2.6.24.orig/drivers/i2c/busses/i2c-s3c2410.c 2008-08-28 18:22:28.000000000 +1000
+++ linux-2.6.24/drivers/i2c/busses/i2c-s3c2410.c 2008-08-28 18:23:53.000000000 +1000
@@ -483,7 +483,7 @@
if (!(iicstat & S3C2410_IICSTAT_BUSBUSY))
return 0;
- msleep(1);
+ udelay(1000);
}
dev_dbg(i2c->dev, "timeout: GPEDAT is %08x\n",
@@ -535,7 +535,7 @@
/* ensure the stop has been through the bus */
- msleep(1);
+ udelay(500);
out:
return ret;