From patchwork Fri Dec 20 10:26:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sunil joshi X-Patchwork-Id: 3387541 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A7D239F314 for ; Fri, 20 Dec 2013 10:26:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 613D2206EA for ; Fri, 20 Dec 2013 10:26:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CABF9206E9 for ; Fri, 20 Dec 2013 10:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756434Ab3LTK0n (ORCPT ); Fri, 20 Dec 2013 05:26:43 -0500 Received: from mail-ob0-f175.google.com ([209.85.214.175]:38752 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756369Ab3LTK0j (ORCPT ); Fri, 20 Dec 2013 05:26:39 -0500 Received: by mail-ob0-f175.google.com with SMTP id uz6so2467726obc.6 for ; Fri, 20 Dec 2013 02:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KnBI37PmD1Xcl+13rbaZ3GaDwX5ZfkZLACq03I6Er5k=; b=Gt7izJnGIwI6SBQwbJteDc7tMWmoKSo4chswm/Fd8rx58pxVrwMkuCgleDKSiRG8CC IfcKR74CdkH+nhJxcvHuetYAFsahjysNzZxTCyw/K+p2ZsRUCLfWl6bzW24wYlFqFKCr y5IzfZfBQcrIBfbfypjeNae7Praxs2e8zUyzFAdm4Fm+ki1ar2XOTpPQXlJON989y3rg C0+/fAO1go1T7FBUy5pQHtSPHVVRP02kxZLRrJ34RmPygPhrUQsj1P2oumoy+gM+Fydi r1yUzhAfn1vVvp/wokTgQbIe14/qJvfxYjENnMaJx1Qq659bq6xVwHI2UeDLEC0S+h6V zwOA== MIME-Version: 1.0 X-Received: by 10.60.33.196 with SMTP id t4mr57086oei.81.1387535198454; Fri, 20 Dec 2013 02:26:38 -0800 (PST) Received: by 10.76.90.132 with HTTP; Fri, 20 Dec 2013 02:26:38 -0800 (PST) In-Reply-To: References: <1387195271-3613-1-git-send-email-a.kesavan@samsung.com> <2459303.277Jr8aotM@amdc1032> Date: Fri, 20 Dec 2013 15:56:38 +0530 Message-ID: Subject: Re: [PATCH 1/2] ARM: EXYNOS: Support Suspend-to-RAM on EXYNOS5420 From: sunil joshi To: Abhilash Kesavan , abrestic@chromium.org Cc: Bartlomiej Zolnierkiewicz , linux-arm-kernel , linux-samsung-soc , Tomasz Figa , Douglas Anderson , Olof Johansson , Kukjin Kim 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=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Hi Abhilash, I saw another patch in chrome tree ..by Andrew Bresticker which may be relevant here .. Just wondering if you missed adding this ? or this is not needed ? You did not face any issue in getting core to suspend ? ------------------------------------------------------------------------------------------ commit 95402d816b9f1a05ce633f7ff64b4c939c142482 Author: Andrew Bresticker Date: Mon Jul 15 13:14:36 2013 -0700 arm: exynos: disable all interrupts on Exynos5420 before suspend Disable all interrupts from the GIC before entering suspend on Exynos5420 as is done on Exynos5250. If interrupts are enabled, we may receive an interrupt after entering WFI but before the PMU has suspended the system, causing suspend to fail. BUG=chrome-os-partner:20523 TEST=Run suspend_stress_test on Pit and observe that entering suspend no longer occasionally fails with the "Failed to suspend the system" error in exynos_cpu_suspend(). Change-Id: Ia2d963191f4e5485beb295b28f128f2ce256f987 Signed-off-by: Andrew Bresticker Reviewed-on: https://gerrit.chromium.org/gerrit/61948 Reviewed-by: Simon Glass wrote: > Hi Bartlomiej, > > On Mon, Dec 16, 2013 at 6:18 PM, Bartlomiej Zolnierkiewicz > wrote: >> >> Hi, >> >> On Monday, December 16, 2013 05:31:10 PM Abhilash Kesavan wrote: >>> Add PMU configuration table for various low power modes - AFTR/LPA/SLEEP. >>> Also, add core s2r support for Exynos5420. >>> >>> Signed-off-by: Abhilash Kesavan >>> --- >>> This patch depends on "ARM: EXYNOS5: Add PMU settings for exynos5420" >>> http://www.spinics.net/lists/linux-samsung-soc/msg24902.html >> >> [...] >> >>> @@ -253,10 +316,20 @@ static int exynos_pm_suspend(void) >>> >>> /* Setting SEQ_OPTION register */ >>> >>> - tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); >>> - __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); >>> + if (soc_is_exynos5420()) { >>> + cluster_id = (read_cpuid(CPUID_MPIDR) >> 8) & 0xf; >>> + if (!cluster_id) >>> + __raw_writel(EXYNOS5420_ARM_USE_STANDBY_WFI0, >>> + S5P_CENTRAL_SEQ_OPTION); >>> + else >>> + __raw_writel(EXYNOS5420_KFC_USE_STANDBY_WFI0, >>> + S5P_CENTRAL_SEQ_OPTION); >>> + } else if (soc_is_exynos5250()) { >> >> Adding a check here for EXYNOS5250 doesn't look correct >> (the old code behavior for older EXYNOYS SoCs should be >> preserved). > > Yes, will fix this in the next version. > >> >>> + tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); >>> + __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); >>> + } >> >> Best regards, >> -- >> Bartlomiej Zolnierkiewicz >> Samsung R&D Institute Poland >> Samsung Electronics >> >> > > Thanks, > Abhilash >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- > 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 --- 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-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 537051d..9fdb8bc 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -126,7 +126,7 @@ static int exynos_cpu_suspend(unsigned long arg) * Disable all interrupts. eints will still be active during * suspend so its ok to mask everything here */ - if (soc_is_exynos5250()) + if (soc_is_exynos5250() || soc_is_exynos5420()) __raw_writel(0x0, S5P_VA_GIC_DIST + GIC_DIST_CTRL); On Tue, Dec 17, 2013 at 8:40 AM, Abhilash Kesavan