From patchwork Tue Jul 31 18:16:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunter, Jon" X-Patchwork-Id: 1261511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 374723FC1A for ; Tue, 31 Jul 2012 18:18:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SwGzv-0001q7-Nk; Tue, 31 Jul 2012 18:16:47 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SwGzr-0001oa-3j for linux-arm-kernel@lists.infradead.org; Tue, 31 Jul 2012 18:16:43 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q6VIGaP4017189; Tue, 31 Jul 2012 13:16:36 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q6VIGaBh028067; Tue, 31 Jul 2012 13:16:36 -0500 Received: from [192.157.144.139] (192.157.144.139) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Tue, 31 Jul 2012 13:16:36 -0500 Message-ID: <5018210A.1040902@ti.com> Date: Tue, 31 Jul 2012 13:16:42 -0500 From: Jon Hunter User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Paul Walmsley Subject: Re: [PATCH V2 08/10] ARM: OMAP4: Prevent EMU power domain transitioning to OFF when in-use References: <1339104132-26885-1-git-send-email-jon-hunter@ti.com> <1339104132-26885-9-git-send-email-jon-hunter@ti.com> <500028B3.1040309@ti.com> <50045D17.9050704@ti.com> <50171841.40309@ti.com> <501760BF.8070801@ti.com> In-Reply-To: <501760BF.8070801@ti.com> X-Originating-IP: [192.157.144.139] X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.94.94.41 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kevin Hilman , Benoit Cousson , Ming Lei , Will Deacon , linux-omap , linux-arm X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi Paul, On 07/30/2012 11:36 PM, Jon Hunter wrote: > Hi Paul, > > On 07/30/2012 06:26 PM, Jon Hunter wrote: > > [...] > >> 1. When HWMOD attempts to disable the clock domain for OMAP2/3 devices >> we simply return without doing anything. Not sure if it is safe to >> remove this but I can do some more testing on OMAP2/3. >> >> commit a0307bd539ecef976793679a1c4ff0d47b22c4bd >> Author: Jon Hunter >> Date: Mon Jul 30 18:04:06 2012 -0500 >> >> ARM: OMAP2/3: Allow HWMOD to disable clock domains >> >> Currently when HWMOD attempts to disable a clock domain on OMAP2/3 devices we >> will return from the function clkdm_hwmod_disable() without actually disabling >> the clock domain. Per the comment this is deliberate because initially HWMOD >> OMAP2/3 devices did not support clock domains. However, clock domains are now >> supported by HWMOD for these devices and so allow HWMOD to disable the clock >> domains. >> >> XXX - Tested on OMAP3430 beagle board, but needs more testing on OMAP2/3 >> >> diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c >> index 011186f..8f7a941 100644 >> --- a/arch/arm/mach-omap2/clockdomain.c >> +++ b/arch/arm/mach-omap2/clockdomain.c >> @@ -1075,10 +1075,6 @@ int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh) >> */ >> int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh) >> { >> - /* The clkdm attribute does not exist yet prior OMAP4 */ >> - if (cpu_is_omap24xx() || cpu_is_omap34xx()) >> - return 0; >> - >> /* >> * XXX Rewrite this code to maintain a list of enabled >> * downstream hwmods for debugging purposes? >> >> >> 2. I need to make the following changes to your patch. The change to >> omap2_clkdm_clk_disable() was needed to get the EMU to turn off. >> At the same time I thought we should make the same change to >> omap2_clkdm_clk_enable(). >> >> diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c >> index 09385a9..c94b2fb 100644 >> --- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c >> +++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c >> @@ -223,7 +223,8 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) >> _enable_hwsup(clkdm); >> } else { >> if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) >> - omap2_clkdm_wakeup(clkdm); >> + (cpu_is_omap24xx()) ? omap2_clkdm_wakeup(clkdm) : >> + omap3_clkdm_wakeup(clkdm); >> } >> >> return 0; >> @@ -257,7 +258,8 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm) >> _enable_hwsup(clkdm); >> } else { >> if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP) >> - omap2_clkdm_sleep(clkdm); >> + (cpu_is_omap24xx()) ? omap2_clkdm_sleep(clkdm) : >> + omap3_clkdm_sleep(clkdm); >> } > > I just remembered you sending out a patch [1] to address #2 above. Let > me know your thoughts about change #1. So scratch item #1 above. As Rajendra pointed out in another thread this is not right. The only other comment I have with your patch is maybe we need to add the following to prevent the EMU PD being idled during boot-up if enabled early in the boot process. Cheers Jon diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 011186f..84d3fbc 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -825,7 +825,8 @@ void clkdm_allow_idle(struct clockdomain *clkdm) if (!clkdm) return; - if (!(clkdm->flags & CLKDM_CAN_ENABLE_AUTO)) { + if (!(clkdm->flags & CLKDM_CAN_ENABLE_AUTO) || + (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING)) { pr_debug("clock: automatic idle transitions cannot be enabled " "on clockdomain %s\n", clkdm->name); return;