From patchwork Fri Mar 20 08:09:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kim kyuwon X-Patchwork-Id: 13235 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2K8AEfa003893 for ; Fri, 20 Mar 2009 08:10:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751300AbZCTIJy (ORCPT ); Fri, 20 Mar 2009 04:09:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752229AbZCTIJy (ORCPT ); Fri, 20 Mar 2009 04:09:54 -0400 Received: from rv-out-0506.google.com ([209.85.198.228]:50789 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbZCTIJw (ORCPT ); Fri, 20 Mar 2009 04:09:52 -0400 Received: by rv-out-0506.google.com with SMTP id f9so975643rvb.1 for ; Fri, 20 Mar 2009 01:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=KqnLXlonvWheUm7/1pcfQY6yWN4OnhKX9Fre0YPSilo=; b=SfZJLfHZgr5q6Gl7R+s/rPRZpYBBdCjD8i9dBbJGq0Q7GB+51yu0MFmyofaa9NpNum +R960dS8xlsOfnXhHK5n3lsGAmwIGcWZ8MVhRQcewxtNIJKMuSArrpIfUUlxTsneu73G mZRlXGlUOXqeXGidRmI++UeOvCk5GC6bHwy0M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=cq5FSax1GdVctFfxPyunaql8CdbTSuG7492J8caN1FS9zYkWZ6TSe7yCAt2c1sez2K 8OgPQmjn73ykeWZ1WohIS/hJ3t09uhVZdQRdJ00pNyKsKb7LkoYmYkLhAV5Ji7W1qe31 d0CcbpL1wJneZ5pFE8ChXLqZfkdqHD43sUvKA= MIME-Version: 1.0 Received: by 10.142.88.4 with SMTP id l4mr1366731wfb.117.1237536590246; Fri, 20 Mar 2009 01:09:50 -0700 (PDT) Date: Fri, 20 Mar 2009 17:09:50 +0900 Message-ID: <4d34a0a70903200109j66153e9ej4f49b98a9a3d2c85@mail.gmail.com> Subject: [PATCH 2/2] OMAP3: PM: Invoke omap3_save_scratchpad_contents() only once at boot time From: Kim Kyuwon To: OMAP Cc: Kevin Hilman , =?EUC-KR?B?udqw5rnO?= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org If CONFIG_CPU_IDLE is y, omap3_save_scratchpad_contents() is called twice at boot time. This patch let it be invoked only once. Signed-off-by: Kim Kyuwon --- arch/arm/mach-omap2/cpuidle34xx.c | 2 -- arch/arm/mach-omap2/pm34xx.c | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index a5eba31..056fb5f 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -271,8 +271,6 @@ int omap3_idle_init(void) struct cpuidle_state *state; struct cpuidle_device *dev; - omap3_save_scratchpad_contents(); - mpu_pd = pwrdm_lookup("mpu_pwrdm"); core_pd = pwrdm_lookup("core_pwrdm"); per_pd = pwrdm_lookup("per_pwrdm"); diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index ff9f28d..001baa9 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -967,6 +967,8 @@ int __init omap3_pm_init(void) #endif /* CONFIG_SUSPEND */ pm_idle = omap3_pm_idle; + + omap3_save_scratchpad_contents(); omap3_idle_init(); pwrdm_add_wkdep(neon_pwrdm, mpu_pwrdm); @@ -984,10 +986,7 @@ int __init omap3_pm_init(void) if (!omap3_secure_ram_storage) printk(KERN_ERR "Memory allocation failed when" "allocating for secure sram context\n"); - } - omap3_save_scratchpad_contents(); - if (omap_type() != OMAP2_DEVICE_TYPE_GP) { local_irq_disable(); local_fiq_disable();