From patchwork Fri Sep 26 02:40:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khiem Nguyen X-Patchwork-Id: 4978141 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 725C7BEEA6 for ; Fri, 26 Sep 2014 02:40:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 996D0202AE for ; Fri, 26 Sep 2014 02:40:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1B2220274 for ; Fri, 26 Sep 2014 02:40:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752515AbaIZCkD (ORCPT ); Thu, 25 Sep 2014 22:40:03 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:61380 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752386AbaIZCkC (ORCPT ); Thu, 25 Sep 2014 22:40:02 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 26 Sep 2014 11:40:01 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 23D8E44BB8; Fri, 26 Sep 2014 11:40:01 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 0D12F180A0; Fri, 26 Sep 2014 11:40:00 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id F3340180A4; Fri, 26 Sep 2014 11:40:00 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id MBG02734; Fri, 26 Sep 2014 11:40:00 +0900 X-IronPort-AV: E=Sophos;i="5.04,601,1406559600"; d="scan'208";a="169968188" Received: from hqdg0130.wireless.renesas.com (HELO [10.161.20.130]) ([10.161.20.130]) by relmlii1.idc.renesas.com with ESMTP; 26 Sep 2014 11:40:00 +0900 Message-ID: <5424D200.4050208@renesas.com> Date: Fri, 26 Sep 2014 11:40:00 +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 CC: khiem.nguyen.xt@renesas.com, Linux-sh list , KEITA KOBAYASHI Subject: [PATCH RFC 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.6 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();