linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* i2c-gpio performance issue w/MPC8xx @ 50 MHz
@ 2011-04-19 20:53 Eran Duchan
       [not found] ` <BANLkTikaS8yOTcO+OChvutB0syWdVBsh8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Eran Duchan @ 2011-04-19 20:53 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hey list

I needed to bit bang I2C on an ancient MPC875 running at a blazing 50
MHz. I started by initializing the generic i2c-gpio bus but quickly
found it could not bit bang @ 100 kHz. The most I was able to get it
was ~50 kHz by setting udelay to 0 and patching around i2c-gpio.c to
make sure it doesn't modify this value.

I then implemented a bus driver of my own, based on i2c-gpio. The only
difference was that it simply implemented set/get sda/scl by directly
writing to hardware. Using this I was able to reach around 150 kHz.

1) Any comments on the above? Could I have done something differently?
2) I thought perhaps a thin adapter could be implemented that exported
a platform data structure holding callbacks: set sda/scl dir/val, get
sda/scl. By registering such a bus driver and supplying these
callbacks in the platform module, one could avoid having to
re-implement a bus driver like I did. Comments?

Thanks
Eran

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-05 19:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 20:53 i2c-gpio performance issue w/MPC8xx @ 50 MHz Eran Duchan
     [not found] ` <BANLkTikaS8yOTcO+OChvutB0syWdVBsh8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-01  8:26   ` Jean Delvare
     [not found]     ` <20110501102603.7993da58-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-05-01 22:04       ` Håvard Skinnemoen
     [not found]         ` <BANLkTik_mBMHJt-MzcSQfdnAhseBM5KwFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-02  8:48           ` Eran Duchan
     [not found]             ` <BANLkTi=+JxbLfvjrh8A_KQ58CeJJB0wKjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-05 18:54               ` Håvard Skinnemoen
     [not found]                 ` <BANLkTikaifXi9+G-3=QAihqxZqPAuBSuGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-05 19:48                   ` Jean Delvare
2011-05-04 21:50           ` Ben Dooks
     [not found]             ` <20110504215049.GX15795-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-05-05 18:42               ` Håvard Skinnemoen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).