From patchwork Mon Sep 29 05:05:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khiem Nguyen X-Patchwork-Id: 4993391 Return-Path: X-Original-To: patchwork-linux-sh@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 669CBBEEA7 for ; Mon, 29 Sep 2014 05:05:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C25320254 for ; Mon, 29 Sep 2014 05:05:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F04620256 for ; Mon, 29 Sep 2014 05:05:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbaI2FFt (ORCPT ); Mon, 29 Sep 2014 01:05:49 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:47290 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750844AbaI2FFs (ORCPT ); Mon, 29 Sep 2014 01:05:48 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 29 Sep 2014 14:05:47 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 1B9B24608E; Mon, 29 Sep 2014 14:05:47 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 1D55E180A1; Mon, 29 Sep 2014 14:05:47 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 17A1E180A0; Mon, 29 Sep 2014 14:05:47 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id QAJ23328; Mon, 29 Sep 2014 14:05:47 +0900 X-IronPort-AV: E=Sophos;i="5.04,617,1406559600"; d="scan'208";a="171207122" Received: from hqdg0130.wireless.renesas.com (HELO [10.161.20.130]) ([10.161.20.130]) by relmlii2.idc.renesas.com with ESMTP; 29 Sep 2014 14:05:46 +0900 Message-ID: <5428E8AA.1060501@renesas.com> Date: Mon, 29 Sep 2014 14:05:46 +0900 From: Khiem Nguyen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Magnus Damm , Simon Horman , Linux-sh list , rjw@rjwysocki.net, Russell King CC: khiem.nguyen.xt@renesas.com, KEITA KOBAYASHI , Geert Uytterhoeven , sergei.shtylyov@cogentembedded.com Subject: [PATCH RFC v2 2/7] ARM: shmobile: use signals from SYSC to wake up from Suspend-to-RAM Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Disable GIC CPU IF so system will only resume by permitted wakeup signals via System Controller IP. It improves low-power implementation and prepares for cluster powerdown in future. Signed-off-by: Shinya Kuribayashi Signed-off-by: Khiem Nguyen --- arch/arm/mach-shmobile/platsmp-apmu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c index 21f8ddd..f6e4f0b 100644 --- a/arch/arm/mach-shmobile/platsmp-apmu.c +++ b/arch/arm/mach-shmobile/platsmp-apmu.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -214,6 +215,13 @@ static int shmobile_smp_apmu_do_suspend(unsigned long cpu) #if defined(CONFIG_SUSPEND) static int shmobile_smp_apmu_enter_suspend(suspend_state_t state) { + /* + * Disable the CPU interface when a CPU core is entering L2 + * shutdown mode, that will help us to prevent spurious CPU + * wakeup to happen upon WFI execution. + */ + gic_cpu_if_down(); + shmobile_smp_hook(smp_processor_id(), virt_to_phys(cpu_resume), 0); cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend); cpu_leave_lowpower();