From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Dooks Date: Thu, 20 Jan 2011 17:02:55 +0000 Subject: Re: Locking in the clk API Message-Id: <4D386ABF.9060908@fluff.org> List-Id: References: <201101111016.42819.jeremy.kerr@canonical.com> <20110111091607.GI12552@n2100.arm.linux.org.uk> <201101111744.59712.jeremy.kerr@canonical.com> <20110111103929.GN24920@pengutronix.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-arm-kernel@lists.infradead.org On 11/01/11 11:15, Richard Zhao wrote: > 2011/1/11 Uwe Kleine-K=F6nig : [snip] > A well running board will not enable/disable PLLs frequently. It don't > make sense. PLLs are normally disabled on request to enter low power > mode, rather not because all their child clocks are disabled. So we > don't have to consider the time here. I'd rather see that if all child clocks are disabled the PLL is powered down then. It means PLLs _could_ be left running even when power-down mode is selected because the system still thinks that a peripheral is using them. If you want to make it so that each low-power mode has to work out what PLLs need to be disabled and then re-enabled makes me want to be sick. Hiding this stuff behind specific implementations is a recipe for disaster. From mboxrd@z Thu Jan 1 00:00:00 1970 From: ben-linux@fluff.org (Ben Dooks) Date: Thu, 20 Jan 2011 17:02:55 +0000 Subject: Locking in the clk API In-Reply-To: References: <201101111016.42819.jeremy.kerr@canonical.com> <20110111091607.GI12552@n2100.arm.linux.org.uk> <201101111744.59712.jeremy.kerr@canonical.com> <20110111103929.GN24920@pengutronix.de> Message-ID: <4D386ABF.9060908@fluff.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 11/01/11 11:15, Richard Zhao wrote: > 2011/1/11 Uwe Kleine-K?nig : [snip] > A well running board will not enable/disable PLLs frequently. It don't > make sense. PLLs are normally disabled on request to enter low power > mode, rather not because all their child clocks are disabled. So we > don't have to consider the time here. I'd rather see that if all child clocks are disabled the PLL is powered down then. It means PLLs _could_ be left running even when power-down mode is selected because the system still thinks that a peripheral is using them. If you want to make it so that each low-power mode has to work out what PLLs need to be disabled and then re-enabled makes me want to be sick. Hiding this stuff behind specific implementations is a recipe for disaster. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726Ab1ATRDF (ORCPT ); Thu, 20 Jan 2011 12:03:05 -0500 Received: from dsl78-143-211-26.in-addr.fast.co.uk ([78.143.211.26]:45165 "EHLO ben-laptop" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752240Ab1ATRDC (ORCPT ); Thu, 20 Jan 2011 12:03:02 -0500 Message-ID: <4D386ABF.9060908@fluff.org> Date: Thu, 20 Jan 2011 17:02:55 +0000 From: Ben Dooks User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Richard Zhao CC: =?ISO-8859-1?Q?Uwe_Kleine-K=F6nig?= , Lorenzo Pieralisi , Russell King - ARM Linux , linux-sh , Ben Herrenschmidt , Sascha Hauer , linux-kernel , Vincent Guittot , Jeremy Kerr , linux-arm-kernel Subject: Re: Locking in the clk API References: <201101111016.42819.jeremy.kerr@canonical.com> <20110111091607.GI12552@n2100.arm.linux.org.uk> <201101111744.59712.jeremy.kerr@canonical.com> <20110111103929.GN24920@pengutronix.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/11 11:15, Richard Zhao wrote: > 2011/1/11 Uwe Kleine-König : [snip] > A well running board will not enable/disable PLLs frequently. It don't > make sense. PLLs are normally disabled on request to enter low power > mode, rather not because all their child clocks are disabled. So we > don't have to consider the time here. I'd rather see that if all child clocks are disabled the PLL is powered down then. It means PLLs _could_ be left running even when power-down mode is selected because the system still thinks that a peripheral is using them. If you want to make it so that each low-power mode has to work out what PLLs need to be disabled and then re-enabled makes me want to be sick. Hiding this stuff behind specific implementations is a recipe for disaster.