From patchwork Fri May 17 16:24:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2583801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id E76E2DF215 for ; Fri, 17 May 2013 16:25:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UdNTK-0008JP-19; Fri, 17 May 2013 16:25:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UdNTG-0001Pg-Oz; Fri, 17 May 2013 16:25:30 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UdNTC-0001O2-BT for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2013 16:25:27 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MMY009ZMAXN4WA0@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2013 17:25:00 +0100 (BST) X-AuditID: cbfec7f5-b7f376d000001ec6-b5-519659dc748a Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 64.C2.07878.CD956915; Fri, 17 May 2013 17:25:00 +0100 (BST) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MMY00K5ZAXKIM00@eusync2.samsung.com>; Fri, 17 May 2013 17:25:00 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/6] ARM: EXYNOS: Fix EINT wake-up mask configuration when pinctrl is used Date: Fri, 17 May 2013 18:24:28 +0200 Message-id: <1368807872-2601-3-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.2.1 In-reply-to: <1368807872-2601-1-git-send-email-t.figa@samsung.com> References: <1368807872-2601-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsVy+t/xK7p3IqcFGrTNkrL4O+kYu8XZZQfZ LP4/es1q0bvgKpvF2aY37BZT/ixnstj0+BqrxYzz+5gsTl3/zGZxYcVGdotXB9tYLNbPeM1i cWzGEkYHXo/fvyYxesxuuMjicefaHjaPzUvqPa6caGL16NuyitFj+7V5zB6fN8l5bJwbGsAZ xWWTkpqTWZZapG+XwJXxbfl5poIJPBVtx2czNjBu4+pi5OCQEDCRWLZMu4uRE8gUk7hwbz1b FyMXh5DAUkaJq0eus0A4fUwSkxbcYAepYhNQk/jc8IgNxBYRUJX43LaAHaSIWWAns8TlBzdZ QBLCAjESZ3fuAmtgASp6fm0DM4jNK+Aose/TfBaIdQoSx7dvYwSxOQWcJN7MmgNWIwRUc7Pr LOsERt4FjAyrGEVTS5MLipPSc430ihNzi0vz0vWS83M3MULC9usOxqXHrA4xCnAwKvHwfnSd FijEmlhWXJl7iFGCg1lJhPf4x6mBQrwpiZVVqUX58UWlOanFhxiZODilGhiv3p15+2zJvX2H g5smm9S0pxl9nd58N0ZxT5xrqm9q2rI3/109mdKfe+99+vTEBRmNL8lW6/yrTl9/nODXIiY8 KVw7JOuE6X2bBXLMRZsaeIu9PZPrrzPqe7npCub1LQro658vJ+T+ele4yHQHUeF1WpNeHxGS sfmq/fOqoceRh2tFmTJeqyuxFGckGmoxFxUnAgBRdsDrOQIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130517_122526_483765_00632FAF X-CRM114-Status: UNSURE ( 8.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.11 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, =?UTF-8?q?Heiko=20St=C3=BCbner?= , arnd@arndb.de, Stephen Warren , Linus Walleij , Prathyush K , Doug Anderson , Kyungmin Park , Thomas Abraham , olof@lixom.net, Tomasz Figa , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On DT-enabled systems pinctrl-exynos driver is responsible for handling of wake-up EINT interrupts. This patch adjusts wake-up mask configuration code to take wake-up mask value from pinctrl-exynos driver on DT-enabled systems. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Tested-by: Doug Anderson Reviewed-by: Doug Anderson --- arch/arm/mach-exynos/include/mach/pm-core.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/include/mach/pm-core.h b/arch/arm/mach-exynos/include/mach/pm-core.h index 7dbbfec..296090e 100644 --- a/arch/arm/mach-exynos/include/mach/pm-core.h +++ b/arch/arm/mach-exynos/include/mach/pm-core.h @@ -18,8 +18,15 @@ #ifndef __ASM_ARCH_PM_CORE_H #define __ASM_ARCH_PM_CORE_H __FILE__ +#include #include +#ifdef CONFIG_PINCTRL_EXYNOS +extern u32 exynos_get_eint_wake_mask(void); +#else +static inline u32 exynos_get_eint_wake_mask(void) { return 0xffffffff; } +#endif + static inline void s3c_pm_debug_init_uart(void) { /* nothing here yet */ @@ -27,7 +34,12 @@ static inline void s3c_pm_debug_init_uart(void) static inline void s3c_pm_arch_prepare_irqs(void) { - __raw_writel(s3c_irqwake_eintmask, S5P_EINT_WAKEUP_MASK); + u32 eintmask = s3c_irqwake_eintmask; + + if (of_have_populated_dt()) + eintmask = exynos_get_eint_wake_mask(); + + __raw_writel(eintmask, S5P_EINT_WAKEUP_MASK); __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); }