From patchwork Tue Jan 24 23:56:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 6387 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 01C5423E81 for ; Tue, 24 Jan 2012 23:56:16 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id E5268A1854D for ; Tue, 24 Jan 2012 23:56:15 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id r19so4746697bka.11 for ; Tue, 24 Jan 2012 15:56:15 -0800 (PST) Received: by 10.205.139.12 with SMTP id iu12mr5891905bkc.2.1327449375662; Tue, 24 Jan 2012 15:56:15 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.204.130.220 with SMTP id u28cs118204bks; Tue, 24 Jan 2012 15:56:15 -0800 (PST) Received: by 10.180.75.212 with SMTP id e20mr24387514wiw.11.1327449374370; Tue, 24 Jan 2012 15:56:14 -0800 (PST) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id h2si13783499wed.83.2012.01.24.15.56.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jan 2012 15:56:14 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by wgbgn7 with SMTP id gn7so896184wgb.1 for ; Tue, 24 Jan 2012 15:56:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.99.100 with SMTP id ep4mr24522998wib.7.1327449374091; Tue, 24 Jan 2012 15:56:14 -0800 (PST) Received: from localhost.localdomain (AToulouse-159-1-6-230.w90-60.abo.wanadoo.fr. [90.60.241.230]) by mx.google.com with ESMTPS id em13sm21411324wid.7.2012.01.24.15.56.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jan 2012 15:56:13 -0800 (PST) From: Daniel Lezcano To: linux@maxim.org.za, nicolas.ferre@atmel.com, plagnioj@jcrosoft.com Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/4] at91 : remove wait_for_interrupt definition Date: Wed, 25 Jan 2012 00:56:07 +0100 Message-Id: <1327449368-29917-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1327449368-29917-1-git-send-email-daniel.lezcano@linaro.org> References: <1327449368-29917-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQl9Ucdjm9ujbBlh4JvfKJHoHeHTX18csFGpVX/d8qe3GTWmxYLoYuC1BXTy0CC+YLGK0Baq All the "wait_for_interrupt" definition are aliases to cpu_do_idle. Only the rm9200 has an asm routine to switch to wfi. But the cpu_do_idle for this platform has exactly the same asm routine. arch/arm/mm/proc-arm920.S ... ENTRY(cpu_arm920_do_idle) mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt ... Then it is safe to invoke cpu_do_idle for this platform. As all the wait_for_interrupts are definition for cpu_do_idle, let's remove it and replace its invokation by cpu_do_idle. Signed-off-by: Daniel Lezcano Signed-off-by: Nicolas Ferre --- arch/arm/mach-at91/pm.c | 2 +- arch/arm/mach-at91/pm.h | 12 ------------ 2 files changed, 1 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 62ad955..acf32c7 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -272,7 +272,7 @@ static int at91_pm_enter(suspend_state_t state) : /* no input */ : "r0"); saved_lpr = sdram_selfrefresh_enable(); - wait_for_interrupt_enable(); + cpu_do_idle(); sdram_selfrefresh_disable(saved_lpr); break; diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index 325ef76..624c99c 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h @@ -36,10 +36,6 @@ static inline u32 sdram_selfrefresh_enable(void) #define sdram_selfrefresh_disable(saved_lpr) \ at91_sys_write(AT91_SDRAMC_LPR, saved_lpr) -#define wait_for_interrupt_enable() \ - asm volatile ("mcr p15, 0, %0, c7, c0, 4" \ - : : "r" (0)) - #elif defined(CONFIG_ARCH_AT91CAP9) #include @@ -58,9 +54,6 @@ static inline u32 sdram_selfrefresh_enable(void) #define sdram_selfrefresh_disable(saved_lpr) \ at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr) -#define wait_for_interrupt_enable() \ - cpu_do_idle() - #elif defined(CONFIG_ARCH_AT91SAM9G45) #include @@ -97,8 +90,6 @@ static inline u32 sdram_selfrefresh_enable(void) at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \ } while (0) -#define wait_for_interrupt_enable() cpu_do_idle() - #else #include @@ -125,9 +116,6 @@ static inline u32 sdram_selfrefresh_enable(void) #define sdram_selfrefresh_disable(saved_lpr) \ at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr) -#define wait_for_interrupt_enable() \ - cpu_do_idle() - #endif #endif