From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 18 06:19:25 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 05350106566C for ; Sun, 18 Dec 2011 06:19:25 +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 AB2768FC14 for ; Sun, 18 Dec 2011 06:19:24 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so5806084vcb.13 for ; Sat, 17 Dec 2011 22:19:23 -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; bh=dmjG5CF1MZV/QDGhOefqA71yhlUI9gVjsyt8C6tHqAY=; b=wbdst800Jbaq43bHgS8faOTgsABSgk81LzBhED00oj9en3kremkUkawJXIeeNcHgh5 GVCkH+dDdJ5/yaAvROt1SlJHwCgmvfTokGk9M/Awbi3Rp9wksMEPy2Q4TWUFxs6Zp6sB aLqaVrMy0Zgs1NrLP0dewzDwBVRDmfNq4X7B0= MIME-Version: 1.0 Received: by 10.220.230.67 with SMTP id jl3mr7136015vcb.60.1324189163869; Sat, 17 Dec 2011 22:19:23 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Sat, 17 Dec 2011 22:19:23 -0800 (PST) In-Reply-To: References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> Date: Sat, 17 Dec 2011 22:19:23 -0800 X-Google-Sender-Auth: 6tYYpk416dzUpwDaNAa_eXRtqew Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: "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: Sun, 18 Dec 2011 06:19:25 -0000 .. also, keep in mind these configs don't currently have preemption enabled. I think that means that during DELAY(), the kernel thread doing our bitbanging is going to be spinning and not be preempted by any other process that may wish to be scheduled. Using up CPU in a busyloop is fine here (well it isn't, as it's power wasting, but that aside) but the fact that the CPU is not able to do any other real work in the meantime is annoying. Anyway, I'm fiddling with extending iicbb to have configurable bitbanging and ACK delays. The other thing you could try is to change the DELAY(10) in iicbb_ack to DELAY(1) and only increment k by one at a time. It would be nice if time-keeping was active at boot probe/attach time, so we could just use pause() and hope that is enough. But yes, time-keeping doesn't seem to be active that early. Adrian