From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 20 07:45:03 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C88A61065675; Tue, 20 Dec 2011 07:45:03 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 794748FC17; Tue, 20 Dec 2011 07:45:03 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 3273B10CCBC; Tue, 20 Dec 2011 08:45:02 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Stefan Bethke In-Reply-To: Date: Tue, 20 Dec 2011 08:45:01 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <1EC329E1-261E-478A-9EEB-A9FB02E893FD@lassitu.de> References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> <18CABB46-9B9A-41CB-8742-6723C5FF4D67@lassitu.de> <2CBD8651-E132-49DC-A082-37A8F5C626EA@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: Oleksandr Tymoshenko , "freebsd-embedded@freebsd.org" Subject: Re: Updated switch/glue patch? X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 07:45:03 -0000 Am 20.12.2011 um 05:34 schrieb Adrian Chadd: > On 19 December 2011 19:53, Adrian Chadd wrote: >> Hi, >>=20 >> 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. :) >=20 > .. and I've just fixed a locking bug, and I've introduced a new iicbb > hint which overrides udelay. >=20 > 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=20 --=20 Stefan Bethke Fon +49 151 14070811