From patchwork Tue Jul 31 04:41:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunter, Jon" X-Patchwork-Id: 1257151 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 4925F3FC1A for ; Tue, 31 Jul 2012 04:44:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sw4Gx-00089r-EH; Tue, 31 Jul 2012 04:41:31 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sw4Gd-00089B-Mr for linux-arm-kernel@lists.infradead.org; Tue, 31 Jul 2012 04:41:12 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q6V4f8jo007782; Mon, 30 Jul 2012 23:41:08 -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 q6V4f86G004991; Mon, 30 Jul 2012 23:41:08 -0500 Received: from [172.24.112.214] (172.24.112.214) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Mon, 30 Jul 2012 23:41:08 -0500 Message-ID: <501761E8.3030307@ti.com> Date: Mon, 30 Jul 2012 23:41:12 -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: Rajendra Nayak Subject: Re: [PATCH] ARM: OMAP3xxx: clockdomain: fix software supervised wakeup/sleep References: <50122A75.2030108@ti.com> In-Reply-To: <50122A75.2030108@ti.com> X-Originating-IP: [172.24.112.214] X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed Cc: Paul Walmsley , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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, Rajendra, On 07/27/2012 12:43 AM, Rajendra Nayak wrote: > On Friday 27 July 2012 02:34 AM, Paul Walmsley wrote: >> >> Commit 4da71ae6 ("OMAP: clockdomain: Arch specific funcs for >> clkdm_clk_enable/disable") called the OMAP2xxx-specific functions for >> clockdomain wakeup and sleep. This would probably have broken >> software-supervised clockdomain wakeup and sleep on OMAP3. > > Its strange this went unnoticed for so long. Thanks for this fix and > sorry about introducing the bug in the first place. Any chance that's because of the following code? I needed to remove this to get the EMU clock domain to turn off on OMAP3 whilst testing PMU. Cheers Jon 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?