Updated switch/glue patch?

Stefan Bethke stb at lassitu.de
Tue Dec 20 07:45:03 UTC 2011


Am 20.12.2011 um 05:34 schrieb Adrian Chadd:

> On 19 December 2011 19:53, Adrian Chadd <adrian at freebsd.org> wrote:
>> Hi,
>> 
>> I've just dumped some more locking fixes into -HEAD. I've also changed
>> iicbb.c a little so it has a configurable udelay. Sorry Stefan, you're
>> going to have to rebase your iicbb changes. :)
> 
> .. and I've just fixed a locking bug, and I've introduced a new iicbb
> hint which overrides udelay.
> 
> Next is adding some more twiddles to enable/disable iicbb debugging,
> iicbus debugging and log transaction failures, ACK times, etc. The
> read transactions all seem to fail ACK btw, so I wonder if that's the
> majority of the CPU time being wasted..

iicbb.c::iicbb_ack() is broken, I believe.  Would you mind trying my version, which should be a drop-in replacement?  You'll have to adjust the iicdelay initialition in iicbb_attach(), but otherwise it should just work.

Note that in the existing iicbb_write(), the code wrongly waits for an ack on the last byte transferred, which is incorrect; on the last byte of the transfer, the ack bit is always 1.


Stefan 

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811





More information about the freebsd-embedded mailing list