From owner-freebsd-arm@FreeBSD.ORG Mon May 5 15:36:08 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EF3562D; Mon, 5 May 2014 15:36:08 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7D71A65; Mon, 5 May 2014 15:36:07 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WhKvw-0009E8-Vx; Mon, 05 May 2014 15:36:01 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s45FZvAV023778; Mon, 5 May 2014 09:35:57 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18RxLeguqT7DwvhftD0LvCW Subject: Re: USB isochronous traffic with Rasberry Pi [WAS: Re: USB audio device on Raspberry Pi] From: Ian Lepore To: Adrian Chadd In-Reply-To: <1399303695.22079.239.camel@revolution.hippie.lan> References: <20140425154430.GA76168@utility-01.thismonkey.com> <535A8AEA.1000100@selasky.org> <20140425204134.GA458@cicely7.cicely.de> <20140430091411.GA45015@utility-01.thismonkey.com> <5360C0A7.9010407@selasky.org> <1398867266.22079.51.camel@revolution.hippie.lan> <5362638B.1080104@selasky.org> <5363C133.2000304@selasky.org> <53677CB8.5000800@selasky.org> <1399303695.22079.239.camel@revolution.hippie.lan> Content-Type: text/plain; charset="us-ascii" Date: Mon, 05 May 2014 09:35:57 -0600 Message-ID: <1399304157.22079.243.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 15:36:08 -0000 On Mon, 2014-05-05 at 09:28 -0600, Ian Lepore wrote: > On Mon, 2014-05-05 at 08:18 -0700, Adrian Chadd wrote: > > evil idea: > > > > #define DELAY(ms) _DELAY(ms, __FILE__, __LINE__) > > > > .. then modify the relevant arm delay function to take FILE/LINE and > > KTR log it. :-) > > > > > > -a > > Except some uart console output routines are structured like > > while (!readreg(STATUS) & TXRDY) > DELAY(n); > > I don't know why people think that calling delay in busy loops like that > has any value, considering that DELAY is almost always implemented as > some form of > > while (readreg(COUNTER) < target_count) > ; > > I guess maybe it has value only in that it helps you find busy-loops. > I'd rather that we had a function just for that purpose, like > > while (readreg(COUNTER) < target_count) > cpu_busy_loop(); > > (We have something like that that's x86-specific, iirc). > > -- Ian Oh never mind, I just noticed you said KTR, not printf. -- Ian