From patchwork Fri Dec 18 14:45:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7885881 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E28B1BEEE5 for ; Fri, 18 Dec 2015 14:45:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A5A52044C for ; Fri, 18 Dec 2015 14:45:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08F6020497 for ; Fri, 18 Dec 2015 14:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753468AbbLROpu (ORCPT ); Fri, 18 Dec 2015 09:45:50 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:52863 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753433AbbLROpt (ORCPT ); Fri, 18 Dec 2015 09:45:49 -0500 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0M5Ksl-1aPFAe3dYV-00zSXl; Fri, 18 Dec 2015 15:45:11 +0100 From: Arnd Bergmann To: Kukjin Kim , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: s3c: simplify s3c_irqwake_{e,}intallow definition Date: Fri, 18 Dec 2015 15:45:08 +0100 Message-ID: <16503982.4JeEM7ZXq8@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:veBUt+Rf6bCrvH6erG1tZfrOZXqOTwwPRVTKUDK3keIHq4Ph104 xYSJVBWrqy3GyASWimGxCtnV8o/vlOJVgLxFUe4oY73RWYh6Y/EFqQe3/O3HjEYZoT/FmmD JzVYNQg36wHM66Sb3JPgHlb0ezVj0Rqdk0tHnsOLGwzm6CgvUPc9R2oadDV8UnXFXEe3d4N oVbPDrNhdwG6JJR7AY5sQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:yBlrzHRsnx0=:Yldslfpvxno4s4hd/chgkP NLoPs/TupWWaVFOKeogKdlB4fZ7MrgfpNNr1Ejde+9nfHlZTi4SdpQi0RbLF5uk+50oWvwGU+ VF4mSJZBB8hlbaBhaLFS4JYZ0r1EFRGwcX+a0qCBs8N8UJHSIzFkPUJEEi8gH2AF46IknoJil RDJmLDSJnDzSH/y5Ry3yfyU/ROHfd6aN7rQU5En7T6urzADWIXS12K0MQXbmEBWioKnSbeVPW YaYbGX5fH1akAo/PrF8XW32vLxHgt/IOZ9/3BfHg6hZlm7M7xnahOGT+tBA8LkIjVe6V2/5tv LH2qZsyznuDqxbGiVlncGwZWyNLWgYVAP3gwOBjNSEIzYAYvEo1VutAJ/aNPGZrMY3zAsDHeL pISNnebeMwi+ce/5JEJfIJJKgg2PU+TN9CFQPv4XiYZbtYGVA6G9gLbvNyZKwoHhsmf6GqV2q p2E+dZ01FhCri04Ems5KlwfPpdYhnsL3YjfpKrIVF62NazWUSKaqyq3KN+8SCgP7RRkT2yI4K RBFZOcMJCpEEEywMbJM2v89/WrweUveng+RvuhSzQmI0wofRxf4JNYe4rAb1Nmnsa5o2drgAS BxGLSnRrTVC9YHbJ1i2nga95H9Wvr/hPRP3SAfQaHMfZQew9ezTyLUSmuyNMqmBXQR/NOrxE8 jp4ehM7hk/ycLK9aENtZ5SptLyI36ehW+xjIglI8gKdszjzulhJXZz0LbhCCndaSpF5nCOhop vzlU3bqboeHZ2KTr Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For a long time, gcc has warned about odd configurations on s3c64xx: In file included from arch/arm/plat-samsung/pm.c:34:0: arch/arm/mach-s3c64xx/include/mach/pm-core.h:61:0: warning: "s3c_irqwake_eintallow" redefined #define s3c_irqwake_eintallow ((1 << 28) - 1) In file included from arch/arm/plat-samsung/pm.c:33:0: arch/arm/plat-samsung/include/plat/pm.h:49:0: note: this is the location of the previous definition #define s3c_irqwake_eintallow 0 The definitions of s3c_irqwake_intallow and s3c_irqwake_eintallow are a bit consistent between the various platforms. Things have become easier now that it's only s3c24xx and s3c64xx that use them at all, so I've tried to rearrange the definitions to make it more obvious what is going on. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Kozlowski --- This fixes a very old and harmless warning, please apply to a cleanup branch if you agree. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h index 69459dbbdcad..712333fec589 100644 --- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h @@ -85,3 +85,17 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs, static inline void s3c_pm_restored_gpios(void) { } static inline void samsung_pm_saved_gpios(void) { } + +/* state for IRQs over sleep */ + +/* default is to allow for EINT0..EINT15, and IRQ_RTC as wakeup sources + * + * set bit to 1 in allow bitfield to enable the wakeup settings on it +*/ +#ifdef CONFIG_PM_SLEEP +#define s3c_irqwake_intallow (1L << 30 | 0xfL) +#define s3c_irqwake_eintallow (0x0000fff0L) +#else +#define s3c_irqwake_eintallow 0 +#define s3c_irqwake_intallow 0 +#endif diff --git a/arch/arm/mach-s3c24xx/irq-pm.c b/arch/arm/mach-s3c24xx/irq-pm.c index b91341ef2b2e..417b7a20c2d1 100644 --- a/arch/arm/mach-s3c24xx/irq-pm.c +++ b/arch/arm/mach-s3c24xx/irq-pm.c @@ -25,19 +25,10 @@ #include #include +#include #include -/* state for IRQs over sleep */ - -/* default is to allow for EINT0..EINT15, and IRQ_RTC as wakeup sources - * - * set bit to 1 in allow bitfield to enable the wakeup settings on it -*/ - -unsigned long s3c_irqwake_intallow = 1L << 30 | 0xfL; -unsigned long s3c_irqwake_eintallow = 0x0000fff0L; - int s3c_irq_wake(struct irq_data *data, unsigned int state) { unsigned long irqbit = 1 << data->hwirq; diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h index 549dadd5f487..4a285e97afff 100644 --- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h @@ -59,9 +59,13 @@ static inline void s3c_pm_arch_show_resume_irqs(void) /* make these defines, we currently do not have any need to change * the IRQ wake controls depending on the CPU we are running on */ - +#ifdef CONFIG_PM_SLEEP #define s3c_irqwake_eintallow ((1 << 28) - 1) #define s3c_irqwake_intallow (~0) +#else +#define s3c_irqwake_eintallow 0 +#define s3c_irqwake_intallow 0 +#endif static inline void s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save) diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index 7f415ce74591..9dd562ab0841 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h @@ -41,14 +41,6 @@ static inline int s3c64xx_pm_init(void) extern unsigned long s3c_irqwake_intmask; extern unsigned long s3c_irqwake_eintmask; -/* IRQ masks for IRQs allowed to go to sleep (see irq.c) */ -extern unsigned long s3c_irqwake_intallow; -#ifdef CONFIG_PM_SLEEP -extern unsigned long s3c_irqwake_eintallow; -#else -#define s3c_irqwake_eintallow 0 -#endif - /* per-cpu sleep functions */ extern void (*pm_cpu_prep)(void);