Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp283180imm; Thu, 10 May 2018 20:39:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp5kIDL2hBE/fMD25n56L2bGykdTwPeX851ROm8ne+4X2JpVJAQYoJGu5Cg63vhrc+6LHnl X-Received: by 2002:a17:902:6b8b:: with SMTP id p11-v6mr3763018plk.212.1526009940166; Thu, 10 May 2018 20:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526009940; cv=none; d=google.com; s=arc-20160816; b=yPUCykg3DxPQqIWKI9tF3F4g/4l9Vx4x1NnFARuTV5aa7hXncS2F9fgkU2e+vOig6L niaXI5nm3xOoOjmLusPeKiG/vGL9IZEPePxQVG5M/r9PwzuIbcSATCbApdhehRstTPfM 8/Zlo9lVxzW8r7hcUdAE8/SPNX+bMB3IzFqnyy8OHEd2s0gmBXmnHVNiCzPPSABpLNbP 3bn8cPMfU6hZXx6ErF8f6Kz98dnoR3W6kOj+hidDWWKkCagQWHZqytO14Z8qmHpPSm76 +rZEue+L8jIW7uYfoxOdgoYA8iRgFze2aW//LAV+jqDCVnhIu2gJ3VA7RZF4PASJuewD 3U0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=vEgchfc3sBNHRk2tGM/jCntWwwAHTuq5iCO8peETSiE=; b=IMpcKhO0sMftygo1RqSKf4+0N/w2XFtxeq6r8FZdao/O+m+mSvaT/lkSJVZGjhl8Fc DyUaftxHMJJYMnIi2/c4gkNTaMjWKog7tN9mamRNvBM8MOlu/4UxzOCBgyNpyyjfp7Wj yQCsJq6g/FB6cYgOKrP9kO+olOLA3XfTIgWDOsbYl9y7IjtTVtCFo6Wbnm3HPvMJ5Iu0 4tKyGvS91U8+u9E61Ml07n43oOobDtMgCC4nYp4VKHZcFRrwR84NT29pTMnzHSAl54Aa EQArm2kVghz719o8ZDK2IIFVuJIesAeLORbtGW7xWbD3Sw796QxLH5M6mW3PB4aZ2WCg W1ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@freescale.onmicrosoft.com header.s=selector1-freescale-onmicrosoft-com header.b=a+U1gjib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si2147131plk.473.2018.05.10.20.38.45; Thu, 10 May 2018 20:39:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@freescale.onmicrosoft.com header.s=selector1-freescale-onmicrosoft-com header.b=a+U1gjib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752553AbeEKDhV (ORCPT + 99 others); Thu, 10 May 2018 23:37:21 -0400 Received: from mail-sn1nam01on0108.outbound.protection.outlook.com ([104.47.32.108]:58784 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750937AbeEKDhQ (ORCPT ); Thu, 10 May 2018 23:37:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freescale.onmicrosoft.com; s=selector1-freescale-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vEgchfc3sBNHRk2tGM/jCntWwwAHTuq5iCO8peETSiE=; b=a+U1gjibyhpE19FR35DEQHsmiEwM1Kfo0MlCKaFX5l/OmBMpho0fkax5NQLfni0ZXMVexsNE0aLjs9aj8rrvtRa7/9Za4aEbhkoUrWZX5Cq2bCoDEcLSySr6AL1QAJ0z7LcYfYyAxL9aqCWgbTE+TfBWZVQYR3ih9de+RTdXEHM= Received: from BN6PR03CA0070.namprd03.prod.outlook.com (2603:10b6:404:4c::32) by SN2PR03MB2189.namprd03.prod.outlook.com (2603:10b6:804:c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.19; Fri, 11 May 2018 03:37:10 +0000 Received: from BY2FFO11FD025.protection.gbl (2a01:111:f400:7c0c::141) by BN6PR03CA0070.outlook.office365.com (2603:10b6:404:4c::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.755.16 via Frontend Transport; Fri, 11 May 2018 03:37:10 +0000 Authentication-Results: spf=fail (sender IP is 64.157.242.222) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 64.157.242.222 as permitted sender) receiver=protection.outlook.com; client-ip=64.157.242.222; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (64.157.242.222) by BY2FFO11FD025.mail.protection.outlook.com (10.1.15.214) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.715.13 via Frontend Transport; Fri, 11 May 2018 03:37:08 +0000 Received: from az84smr01.freescale.net (az84smr01.freescale.net [10.64.34.197]) by tx30smr01.am.freescale.net (8.14.3/8.14.3) with ESMTP id w4B3b7tM026426; Thu, 10 May 2018 20:37:07 -0700 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w4B3aTss014534; Thu, 10 May 2018 20:37:00 -0700 From: Yinbo Zhu To: , Rob Herring , Mark Rutland , "Catalin Marinas )" , "Will Deacon )" , "Lorenzo Pieralisi )" , Li Yang CC: , , Daniel Lezcano , Thomas Gleixner , Shawn Guo , Madalin Bucur , Hou Zhiqiang , Changming Huang , Minghuan Lian , Zhao Qiang , Fabio Estevam , "jiaheng . fan" , Po Liu , Nipun Gupta , =?UTF-8?q?Horia=20Geant=C4=83?= , Priyanka Jain , Sumit Garg , costi , Bogdan Purcareata , Meng Yi , Wang Dongsheng , "open list:CLOCKSOURCE, CLOCKEVENT DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , , "open list:FREESCALE SOC DRIVERS" , Tang Yuantian , , Yuantian Tang Subject: [PATCH 5/9] drivers: firmware: psci: use psci v0.2 to implement sleep Date: Fri, 11 May 2018 11:35:26 +0800 Message-ID: <20180511033530.7931-5-yinbo.zhu@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180511033530.7931-1-yinbo.zhu@nxp.com> References: <20180511033530.7931-1-yinbo.zhu@nxp.com> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:64.157.242.222;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10019020)(1496009)(39860400002)(39380400002)(396003)(376002)(346002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(50466002)(316002)(26005)(7406005)(7416002)(106466001)(16586007)(2906002)(4326008)(81156014)(498600001)(5660300001)(8676002)(8656006)(50226002)(48376002)(81166006)(77096007)(105606002)(1076002)(97736004)(86362001)(356003)(8936002)(36756003)(51416003)(476003)(2616005)(446003)(110136005)(126002)(336012)(76176011)(54906003)(486006)(47776003)(11346002)(6666003)(6636002)(53936002)(44832011)(305945005)(59450400001)(85426001);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR03MB2189;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;LANG:en;PTR:ErrorRetry;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD025;1:dJ0W2YSSexHVe55OWniMIkncX/cnBEqHGhEiJux60nV91K8j//64PQYJ3mBcTmlSbxc0zjH6IKnUG7de2zeUMUSO9QsAAX2xhuW6EbZEQ4vHKVAwCW2mq3l+K0n/OcXU MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(5600026)(2017052603328);SRVR:SN2PR03MB2189; X-Microsoft-Exchange-Diagnostics: 1;SN2PR03MB2189;3:9zICG90Yy251lb2yLUm6iXOQDXWAPY3NnUfsuymdDTsZvp/5vN+L5AVOHH4xQGGWWSlHXJxcRF75oe7lLO/6VOqHez8Q87ndE6ldheNwFc7VT5r1S1yQVqX2otyjzOVMfp77h/zoG3OZ0PSJdelaBV1VDVmUAFBHG6LGG65QvKC32+9wVfCNlVoZUWRbG5s4M/WhLfcLQKbPVdennppjyOHDj/wGCgiiHe4dBTuZfplorwpGZgy+9vHcmrHl3e3y3wP+fA5Gntu0P9svDrA9eW8oJd3eLi+6WHMAkK2GDu+t/Rkm3cuhsz0s4uVndpJJLzgacjQ0PpOn1UmBwWdXyRbiQsLejt+ZxNqngRFRS74=;25:md3esU82diB0TCh2dwZx8Xb5an75/4PcsoBStJycTEpvWdbTGn750n/57Qk0ay7AeHv2tVPBT1TlKPlgSQr5dWzM9cxTJhjILnhRGgx705LiO4V2VxKbfihevBknBYZ9N+H08+/EjUlQYuu3+mlhumKSaEhgBnG6cXQ7+wpNjR22cxW4FANI2WzvHFgHtXyC10n2L/ZFym8thI9Y4dj+3I3XlIYzQbJSVRbSPbJpEq/3oSXdM0yYL1sy6RoF7365+UvGG6W1YphH2177fB3tFRw0sATUbh1/ntYxrXw1TUDyvzkuo3rlAOclDDg7g8DQDbqTHbfiPMxntnKK82JTCQ== X-MS-TrafficTypeDiagnostic: SN2PR03MB2189: X-LD-Processed: 710a03f5-10f6-4d38-9ff4-a80b81da590d,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;SN2PR03MB2189;31:YfC24O4TivbRZzqs3O+C9Yb+QlNDp6YQi7O20fPy4ID7d4b2oeFudsr+zvtPgUST4CckZjiiIt1X+siAZuMHl77vlJMDZsrcgEqlUlLvYZTJ1cvgW+lTjZ48bLj+1Beh5aEkhrnSQtDFBFUEfW+/hUKhemwouyyGQuSaUnjqIU/pzRMP0jepzqS1JnDmmJuG7H2UtFeQXnUQ7zFlaAkqoPJ88N7j92D5MgxNtR+iaKs=;20:e9Gh5KSUhDReZDPPDVy8l+WsT9CgEqIOMpTwgPnQCSyy5xL3h/tfs+V6u8VdNPPoutuM/2bYH/L4DkDi3pdCsuhNWHaEOBxQr49Z4ac3ATRz0djW8qtmAtt9e3CFxj6BtUrk4bUM5OAkF8Vcm7bWj4sg1Hp7icSLgP7mwHw0drTMlIX9PLgXtotuIE98cmWSfIpyJf9N2Ek33955gwuc1WzK0OnoZeIoFOeRBCkM6fbnp5LB8v69M9MVM1jkm9e6Kin5rIgVvkyON69xSuZOIu7d1NymbnJpj84iJOrsuWeZvBZnnsXNvEa7wfxaidl5gH/862iL/uj1eVRYCiC6JJxjDhB0ohRWcymtk2eg9CNTLcY/OdEUMuO7B1BZZh2RkQXw8Fh+LFAeDK1UbdMyz9+P+na1H2XBeA0mBM1zZxDxtU5jCod/ucYhMTctBNivi36Hlue+/yDaHS4LGvn9nTqXDlybfD2wDMcATdz3i4p+7n0y3cGvXV1pNTz54BO314tBm6E0Fp9nuvxcajwBmjgqejx4ou190YWaJabkhlRUbmVezjsz9wmRUxtCzEzMHXGWc3ZCjfKWGgUN8I+/x4ekVlLuLREH3Xuh1tJqyLk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 0 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93003095)(3231254)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:SN2PR03MB2189;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB2189; X-Microsoft-Exchange-Diagnostics: 1;SN2PR03MB2189;4:SY2r+fCAsRbuDQ6tDK24/0RqpI20jEiHLGGdrt/1w1zcDP1MhXyoPOnMtYETcd/ueDoiH8OIh1qyw6MgLjk1BQE1JtFP2g6GymJxkkdEuzRFydunILgxGKzrIs6K8a9M4e0BHMM9PegYnhELLGHUVVa5yCNVpUxl6Q6wYKR2AUtZ6viZWNtWNf/vDFMnq8fIWHDGsIfLkbTZQAu+qDZE28/LhJ8JMhYVOIlj2HSx5u8VNP95mjoZL7pSwGSxHXv33dbxAxu1OyPrjYxWyKbyGazwWQLI1DUNn+Pe207T+yo9EcRlYHRPg3VwP86K8+um X-Forefront-PRVS: 06691A4183 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR03MB2189;23:hiudYMEVLDzKKIfj0m+KyOtOBl7zk24l1NtJwqmwW?= =?us-ascii?Q?Fs7jtneVN8QucydP1ducjeM/m43hPZOTs2Rshwhl+l9fFf9hMf5K46tkWMrU?= =?us-ascii?Q?0J0AXO83C8hFiCqYZeXZNIz2wGci8C14BoGh/wZkf+1E4JGgJqtgHAnYlBmV?= =?us-ascii?Q?h+ATDsLHdSZ4Rg0YvS1u2KuoyK2VSU83SUCuwAbxXB3LpLPyjfUIMznSc+ux?= =?us-ascii?Q?9CxffaY1NGGWlJoPSrAOSkIh98p5hs1ixQbMQYRIFzD1UKeud9rgQZi93RoV?= =?us-ascii?Q?GfcwhbQl8XzxyzZ2hcHPYk2uxYxSI9Ss0oqOiRKxnRqQwQobVAl3eaILV0Jz?= =?us-ascii?Q?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Output: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN2PR03MB2189;7:f3WobbwqBIJlu+2hjib5tuYlGt2gibVlbkqqdfl+YwRRFNdvFmBsvK8QWz7KzMBZhNUCUIwvQC3wRlipG5FtDG8tqaubIeOlqIZXgA7LbZiCXI/yymCAV1MtpwWSBISjCAOM14S9UiEz1feFMd+OGqmLIq6yn1HHPGPGSa2EQy7WDbYwervMda6Bekf8SVH7PQOjIGTSoKdBbiNZA4Xk6T20gmiVbtn22EOJPxnTK11XFJhRyQWURGJGdYZ0A0hw X-MS-Office365-Filtering-Correlation-Id: 412c5e39-aee1-438e-8682-08d5b6f07990 X-OriginatorOrg: freescale.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2018 03:37:08.7126 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 412c5e39-aee1-438e-8682-08d5b6f07990 X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[64.157.242.222];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2189 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yuantian Tang Technically psci v0.2 can not support system sleep. Unfortunately our PPA only supports psci v0.2. So workaround this by changing psci v1.0 to v0.2 call to implement system sleep. Signed-off-by: Tang Yuantian Signed-off-by: Yinbo Zhu --- drivers/firmware/psci.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index c80ec1d..0bd795f 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -437,8 +437,18 @@ int psci_cpu_suspend_enter(unsigned long index) static int psci_system_suspend(unsigned long unused) { - return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND), - __pa_symbol(cpu_resume), 0, 0); + u32 state; + u32 ver = psci_get_version(); + + if (PSCI_VERSION_MAJOR(ver) >= 1) { + return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND), + virt_to_phys(cpu_resume), 0, 0); + } else { + state = (2 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | + (1 << PSCI_0_2_POWER_STATE_TYPE_SHIFT); + + return psci_cpu_suspend(state, virt_to_phys(cpu_resume)); + } } static int psci_system_suspend_enter(suspend_state_t state) @@ -562,6 +572,8 @@ static void __init psci_0_2_set_functions(void) arm_pm_restart = psci_sys_reset; pm_power_off = psci_sys_poweroff; + + suspend_set_ops(&psci_suspend_ops); } /* -- 1.7.1