From martinjonestechnology@googlemail.com Thu Apr 02 09:12:28 2009
Received: from mail-ew0-f163.google.com ([209.85.219.163])
	by stoneboat.aleph1.co.uk with esmtp (Exim 4.69)
	(envelope-from <martinjonestechnology@googlemail.com>)
	id 1LpI2A-0007Jj-JQ
	for balloon@balloonboard.org; Thu, 02 Apr 2009 09:12:28 +0100
Received: by ewy7 with SMTP id 7so460962ewy.13
	for <balloon@balloonboard.org>; Thu, 02 Apr 2009 01:12:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:received:received:sender:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=je0UTqMg0ZFei80AdvMjDe86O3rAnDAs9fTRGOPYY3c=;
	b=Dh2j3KoNd7qlUW2dgi0BDwr5gGzJotIoVW9D19tTBKcuokRhwBFU2DpB+TqK8lBVp/
	zJ8RX3dzWc572FtamDadlFRtm25IzDlVAsUG7lGD77OQWdVCki6ZCfXt0PTElJC6t3UK
	nlypQHWsAzLu6fhpVeT2P7ZvdXaS7jtBpD6zk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	b=jiNTbrCs79AX/tPEorbdCq4OKdmbUw2fe+asEiDpPhcn3XeqxHzECMQG1UBEqrZgui
	BqaLFpTh2aculro3N0mI0E3CvFfd0GhrZj02iWCYKN7jil+qor9TDyUNT2gTCPlA69QE
	8h0+2lWJ/sSxOwfv72e7ynnymhiuywfcSEKxg=
Received: by 10.216.0.208 with SMTP id 58mr2898381web.216.1238659936994;
	Thu, 02 Apr 2009 01:12:16 -0700 (PDT)
Received: from ?192.168.1.6? (cpc4-cmbg1-0-0-cust759.cmbg.cable.ntl.com
	[82.21.110.248])
	by mx.google.com with ESMTPS id u14sm1693093gvf.19.2009.04.02.01.12.15
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 02 Apr 2009 01:12:16 -0700 (PDT)
Sender: Chris Jones <martinjonestechnology@googlemail.com>
Message-ID: <49D47369.2040803@martin-jones.com>
Date: Thu, 02 Apr 2009 09:12:25 +0100
From: Chris Jones <chris@martin-jones.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: Jonathan McDowell <noodles@earth.li>
References: <49D3B00A.4030806@martin-jones.com>
	<20090401220605.GB5306@earth.li>
In-Reply-To: <20090401220605.GB5306@earth.li>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-SA-Exim-Connect-IP: 209.85.219.163
X-SA-Exim-Mail-From: martinjonestechnology@googlemail.com
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS
	autolearn=ham version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Cc: balloon@balloonboard.org
Subject: Re: [Balloon] 2.6.29-rc7 kernel power management
X-BeenThere: balloon@balloonboard.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: Balloon List <balloon.balloonboard.org>
List-Unsubscribe: <http://balloonboard.org/mailman/options/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=unsubscribe>
List-Archive: <http://balloonboard.org/lurker/list/balloon.html>
List-Post: <mailto:balloon@balloonboard.org>
List-Help: <mailto:balloon-request@balloonboard.org?subject=help>
List-Subscribe: <http://balloonboard.org/mailman/listinfo/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Apr 2009 08:12:28 -0000

Jonathan McDowell wrote:
> On Wed, Apr 01, 2009 at 07:18:50PM +0100, Chris Jones wrote:
>> I've been doing some work on L3 standby power this afternoon, the
>> primary upshot of which is that there are now hooks in
>> /arch/arm/mach-pxa/balloon3.c for doing things on the way into and out
>> of standby. I cribbed most of the code straight from palmz72.c which
>> seemed to have the right sort of things in it, so if there's a
>> better/more legitimate way to do it, I'm open to ideas.
> 
> Is this code in SVN now? I'm currently concentrating on getting the base
> balloon3 support into mainline kernels, but I'll have a look if that
> ever gets done.

Yes - I folded the changes into balloon3.patch.

>> The same issue arises with the Samosa bus - did parking the bus lines
>> ever get in after the grand TCL kernel hacking session? I can't see it
>> in the code.
> 
> No, this didn't get added so you're not missing anything.

OK. If I was to put in the relevant code, I assume it would go at the
tail end of samosa_suspend_late() and the head end of
samosa_resume_early(), bracketing the power management of the devices on
the bus.

>> Thinking about these things and looking at the code indicates to me
>> that making the relevant control registers in Balloon 3's programmable
>> logic read/write or at least set/reset rather than write-only would
>> make life somewhat easier in the kernel, but could introduce
>> incompatibilities.
> 
> If necessary we can keep local copies of the state and provide accessor
> functions, but being able to query the hardware or at least only frob
> the bits we need to would be much cleaner.

I propose making the registers set/reset, since:
- it uses less logic resource in the hardware than making them readable
- I've already got a VHDL module which does the job
- it makes changing individual bits an atomic operation, leaving no gap
between a read and a writeback which could get interrupted

There are a couple of bits we need to be able to read, as well. Hold
tight for a Balloon 3 register remap.

Chris
-- 
Chris Jones - chris@martin-jones.com
Martin-Jones Technology Ltd, makers of Solidlights
148 Catharine Street, Cambridge, CB1 3AR, UK
Phone +44 (0) 1223 655611 Fax +44 (0) 870 112 3908
http://www.solidlights.co.uk/


