From patchwork Tue Jun 24 13:57:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 4408851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1953BBEEAA for ; Tue, 24 Jun 2014 14:01:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 193872034B for ; Tue, 24 Jun 2014 14:01:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A84D20304 for ; Tue, 24 Jun 2014 14:01:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzRFd-0004pG-LE; Tue, 24 Jun 2014 13:59:09 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzREl-000488-Qz for linux-arm-kernel@lists.infradead.org; Tue, 24 Jun 2014 13:58:16 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N7O000VDERVF840@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 24 Jun 2014 14:57:31 +0100 (BST) X-AuditID: cbfec7f5-b7f626d000004b39-be-53a983da94ca Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 3C.BE.19257.AD389A35; Tue, 24 Jun 2014 14:57:46 +0100 (BST) Received: from AMDC1227.digital.local ([106.116.147.199]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N7O005SHES5FQ50@eusync3.samsung.com>; Tue, 24 Jun 2014 14:57:46 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 5/6] ARM: EXYNOS: Fix suspend/resume sequencies Date: Tue, 24 Jun 2014 15:57:14 +0200 Message-id: <1403618235-19353-6-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.9.3 In-reply-to: <1403618235-19353-1-git-send-email-t.figa@samsung.com> References: <1403618235-19353-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLJMWRmVeSWpSXmKPExsVy+t/xq7q3mlcGGzw6LWPRu+Aqm8Wmx9dY LS7vmsNmMeP8PiaLtUfuslusn/GaxWLVrj+MDuweO2fdZffYvKTeo2/LKkaPz5vkAliiuGxS UnMyy1KL9O0SuDKmPprAVnCCt2LKAbMGxq9cXYwcHBICJhKPzwl1MXICmWISF+6tZ+ti5OIQ EljKKHH1SDsTSEJIoI9J4nBrAYjNJqAm8bnhERuILSKgKvG5bQE7iM0s8IRRYtZTNxBbWMBe onvNBUYQmwWo5vDfr2A2r4CTxO2361ghlslJ9G57wwxicwo4S+xs38YKsctJ4v/JJqYJjLwL GBlWMYqmliYXFCel5xrpFSfmFpfmpesl5+duYoQE0dcdjEuPWR1iFOBgVOLhrdixIliINbGs uDL3EKMEB7OSCO+NmpXBQrwpiZVVqUX58UWlOanFhxiZODilGhiVbu2/4Kghnr4rozXzcH+K umT0kgaO/1N6RV4rPnxk6P2tL7vRkOPxri9LTjC01We+vPmMP/Wcx4cdHrIpnZV9P42+dKXP 4dcw1nv6uubaYZcp8x6sZzRevVMwIXvtjOodNUFF1x80qIsu5BNlqdT6yVMlF8x+7oXHHN8N t5Xvyjw87JEieE6JpTgj0VCLuag4EQDUkBt2AAIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140624_065816_024014_641DB3A5 X-CRM114-Status: GOOD ( 11.07 ) X-Spam-Score: -5.0 (-----) Cc: Kukjin Kim , Tomasz Figa , Tomasz Figa , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 Due to recent consolidation of Exynos suspend and cpuidle code, some parts of suspend and resume sequences are executed two times, once from exynos_pm_syscore_ops and then from exynos_cpu_pm_notifier() and thus it breaks suspend, at least on Exynos4-based boards. This patch fixes the issue by removing exynos_pm_syscore_ops completely and making the code rely only on CPU PM notifier. Tested on Exynos4210-based Trats board. Signed-off-by: Tomasz Figa --- arch/arm/mach-exynos/pm.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 87c0d34..98d4926 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -364,11 +364,6 @@ early_wakeup: return; } -static struct syscore_ops exynos_pm_syscore_ops = { - .suspend = exynos_pm_suspend, - .resume = exynos_pm_resume, -}; - /* * Suspend Ops */ @@ -438,19 +433,13 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self, switch (cmd) { case CPU_PM_ENTER: - if (cpu == 0) { - exynos_pm_central_suspend(); - exynos_cpu_save_register(); - } + if (cpu == 0) + exynos_pm_suspend(); break; case CPU_PM_EXIT: - if (cpu == 0) { - if (!soc_is_exynos5250()) - scu_enable(S5P_VA_SCU); - exynos_cpu_restore_register(); - exynos_pm_central_resume(); - } + if (cpu == 0) + exynos_pm_resume(); break; } @@ -475,6 +464,5 @@ void __init exynos_pm_init(void) tmp |= ((0xFF << 8) | (0x1F << 1)); __raw_writel(tmp, S5P_WAKEUP_MASK); - register_syscore_ops(&exynos_pm_syscore_ops); suspend_set_ops(&exynos_suspend_ops); }