From patchwork Thu Jul 19 16:00:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 10534901 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AAC38600D0 for ; Thu, 19 Jul 2018 16:13:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92F3829E4B for ; Thu, 19 Jul 2018 16:13:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84AC629E67; Thu, 19 Jul 2018 16:13:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 396AF29E4B for ; Thu, 19 Jul 2018 16:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pc7DO5cQPyo3ZSjq2q5WGieZAgufdX7Y1sPIUz9aZBk=; b=ObFQSGV9H/4lNd sEK4bIG0HHMf8b+3ETyWxs3N34k6K4y3jhH3CXZLBS9tPZz13NZkbU9tfCvwAB9RDTIKNno15Mywa HpNaX3QI27W7OVAvuVWVzAGgNyoSptGnuMWCbhmxxhSK2dSRb9aoZbCuNzHwRB8csHMGSkF6HakmO qisksTWp+qoePvYLhWJoPUToAZwYEJWmihRB0qaGFT2kax9XcE0LXNODn/3TJaZbvvGXI3ObreK71 Vjx1jk7Dw3HtaqMs6deTTyEQf+dFB/ZZjJph4L7DTcBlg5FD+A0bxRLdl+B619HnjcIIRycyACV+v HodKZTWjHxon9XM4RIlQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgBYT-0008Do-Se; Thu, 19 Jul 2018 16:13:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgBNW-00010w-OJ for linux-arm-kernel@lists.infradead.org; Thu, 19 Jul 2018 16:02:13 +0000 Received: from localhost.localdomain (xdsl-188-155-58-14.adslplus.ch [188.155.58.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02CFA20862; Thu, 19 Jul 2018 16:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532016116; bh=FZC4YA6gs87CSmlDC6wU93X0U0dw0YS5bjmojJz9LPE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QHS7ET0mzicHUrNu7EYfgI2SNVt78bdorJHeqRV03lYGBHPpzrS++VG+VW+sRzLd+ HYqAyEHUqHF/em9F7PVoVphT+seA8KgaG0+ODGz4ZcfEVrTP62tjViu/KtIpLQeCG9 MnOqh35DGOm+0jaF1VaFANCSl4JrjBBj98L4fW/A= From: Krzysztof Kozlowski To: Tomasz Figa , Krzysztof Kozlowski , Sylwester Nawrocki , Linus Walleij , Rob Herring , Mark Rutland , Kukjin Kim , Russell King , Arnd Bergmann , Alim Akhtar , Pankaj Dubey , Marek Szyprowski , =?UTF-8?q?Pawe=C5=82=20Chmiel?= , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFT 09/10] ARM: exynos: Remove legacy setting of external wakeup interrupts Date: Thu, 19 Jul 2018 18:00:49 +0200 Message-Id: <20180719160050.22566-10-krzk@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180719160050.22566-1-krzk@kernel.org> References: <20180719160050.22566-1-krzk@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180719_090206_983585_8043EDA2 X-CRM114-Status: GOOD ( 15.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 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 X-Virus-Scanned: ClamAV using ClamSMTP Since Exynos/S5Pv210 pin-controller driver is taking care about setting the external wakeup interrupts mask, the legacy code can be removed. Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-exynos/common.h | 2 -- arch/arm/mach-exynos/suspend.c | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index dcd21bb95e3b..035e51c5f0fc 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -113,8 +113,6 @@ void exynos_firmware_init(void); void exynos_set_boot_flag(unsigned int cpu, unsigned int mode); void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode); -extern u32 exynos_get_eint_wake_mask(void); - #ifdef CONFIG_PM_SLEEP extern void __init exynos_pm_init(void); #else diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 991938e19e17..554d6ea2cb3c 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -88,6 +88,11 @@ static const struct exynos_wkup_irq exynos5250_wkup_irq[] = { { /* sentinel */ }, }; +static u32 exynos_read_eint_wakeup_mask(void) +{ + return pmu_raw_readl(EXYNOS_EINT_WAKEUP_MASK); +} + static int exynos_irq_set_wake(struct irq_data *data, unsigned int state) { const struct exynos_wkup_irq *wkup_irq; @@ -271,8 +276,10 @@ static int exynos5420_cpu_suspend(unsigned long arg) static void exynos_pm_set_wakeup_mask(void) { - /* Set wake-up mask registers */ - pmu_raw_writel(exynos_get_eint_wake_mask(), EXYNOS_EINT_WAKEUP_MASK); + /* + * Set wake-up mask registers + * EXYNOS_EINT_WAKEUP_MASK is set by pinctrl driver in late suspend. + */ pmu_raw_writel(exynos_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); } @@ -482,6 +489,7 @@ static void exynos5420_pm_resume(void) static int exynos_suspend_enter(suspend_state_t state) { + u32 eint_wakeup_mask = exynos_read_eint_wakeup_mask(); int ret; s3c_pm_debug_init(); @@ -489,10 +497,10 @@ static int exynos_suspend_enter(suspend_state_t state) S3C_PMDBG("%s: suspending the system...\n", __func__); S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__, - exynos_irqwake_intmask, exynos_get_eint_wake_mask()); + exynos_irqwake_intmask, eint_wakeup_mask); if (exynos_irqwake_intmask == -1U - && exynos_get_eint_wake_mask() == -1U) { + && eint_wakeup_mask == EXYNOS_EINT_WAKEUP_MASK_DISABLED) { pr_err("%s: No wake-up sources!\n", __func__); pr_err("%s: Aborting sleep\n", __func__); return -EINVAL;