From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 19 04:58:41 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 8EA1A1065672; Mon, 19 Dec 2011 04:58:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 296068FC12; Mon, 19 Dec 2011 04:58:40 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so6436865vcb.13 for ; Sun, 18 Dec 2011 20:58:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=07gJWKpIGmd78i+nn6OrCOwksm8iuvXFMh3u+ShzE7c=; b=rJcm43kTUHfhurfAp6fbq1aGyTQLpxsqHW4fXz9kBa1mIsBgWchXX+1hgKpi4ixCis BqKbm+hnEWgAMA1M/JU9gKtAg/8ExUAf1wT9pLMpBwb12Dy2lH86a2nJz5Ylxw+wd+ZN 8JWVgROl8reR1wi1GwXWZTd31f7nYQNYzIY2w= MIME-Version: 1.0 Received: by 10.220.231.73 with SMTP id jp9mr8687005vcb.50.1324270719128; Sun, 18 Dec 2011 20:58:39 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Sun, 18 Dec 2011 20:58:39 -0800 (PST) In-Reply-To: <18CABB46-9B9A-41CB-8742-6723C5FF4D67@lassitu.de> References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> <18CABB46-9B9A-41CB-8742-6723C5FF4D67@lassitu.de> Date: Sun, 18 Dec 2011 20:58:39 -0800 X-Google-Sender-Auth: 1In3YsmN4000bAR1JqRk0XAAxOA Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Mon, 19 Dec 2011 04:58:41 -0000 On 18 December 2011 02:17, Stefan Bethke wrote: >> Erm, surely that's a bit ridiculous.. surely the locking doesn't need >> to be that fine grained _and_ multi-levelled. There has to be a better >> way to do this. :) > > Exactly. > > I've reimplemented iicbb.c to be slightly more protocol compliant, and to= be able to tune transfer speeds to the actual hardware capabilities. =A0I'= ve timed a single GETSCL (with WITNESS) to 8.7 microseconds, clearly that w= on't do. Ok. I'll check it out soon. > I think I'll look at gpio next, as you have, and see if the overhead can = be reduced. In the meantime, would you mind grabbing the latest code from my git tree (in the work/ath branch) and basing your work off of that? Even with delay=3D10 (the current hardcoded default), it takes up significantly less CPU than before. If we can debug and test this locking hacking and my iicbb changes (which are less intrusive than yours, which I'll review soon and we can merge in later), I'll push this into -HEAD so we can continue shaving off cycles and fixing things up. Thanks again Stefan! Adrian