[i2c] [PATCH] Is review of AT91 patch pending?

Aras Vaichas arasv at magtech.com.au
Fri Oct 19 02:45:32 CEST 2007


Ronny Nilsson wrote:
> Hi
> Here's an update of my AT91 bus driver with IRQ support. Previously 
> the best speed it could handle was in the range of 30-50 kHz, any 
> higher and transfer errors began occurring. This has however changed. 
> The attached patch can handle 400 kHz, even on a loaded system!
> 
> The patch size ha grown considerably, modifying ten files because 
> achieving this kind of speed with the Atmel TWI controller require 
> some dirty SW tricks... One effect of this is that the I2C throughput 
> will decrease when the cpu has much to do. For example, a basic 
> clockrate of 400 kHz might drop towards 100 kHz when the cpu is very 
> heavily loaded. The general speed of your cpu, ram and flash will 
> also have impact. Default speed is 100 kHz but it can be changed in 
> runtime with /sys/devices/platform/at91_i2c/clockrate. If you change 
> it, ensure to monitor the syslog for error messages from the TWI 
> driver!
> 
> Disclaimer:
> This patch is a hack! I mean it! It's highly experimental, ugly and 
> only tested for Atmel AT91RM9200. Suggestions are most welcome for 
> how to make it nicer looking. Testers are wanted too.
> 
> Regards
> /Ronny Nilsson

One more test. I killed every single background process there was and it still 
failed at 100KHz. In a test run of 1000, 4 failed.

Also, I must note that my test procedure uses block reads and I use the i2c-dev 
interface. If I just read one byte at a time, the old driver would never fail 
but it was extremely slow.

Aras

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the i2c mailing list