From patchwork Mon Feb 18 14:34:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 158616 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2563481jaa; Mon, 18 Feb 2019 06:34:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ6lnw0hqczII32K8rrXWpueVVfdqT1tMt6SF0Er5StOWWzsk581TNT5/j8xg4sMkoZZMNS X-Received: by 2002:a62:1382:: with SMTP id 2mr20533053pft.157.1550500465888; Mon, 18 Feb 2019 06:34:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550500465; cv=none; d=google.com; s=arc-20160816; b=JBpOFzJtZTmTLIMA6alPMtQqsPIN99jJl0A6sE0xSQV1c3P7gdGDPpFNnDTlUwiWS6 cVdX4RhJ2cwN5SP0d4QcmU6qib8ZZeUmlsncb2kRhxjWPRWhoeKo/jozkmFkRk3VFOXs nCFDfL1kE13iVDx9MURa/5sgVi2/Aw/Lj73klM0lWoEqKFDZR8EY5mUapIDql2hsNcxi Axr0V7cJ/oH2KoTsoIMMxTu0Y30mxzC1qd8+TtwQxEDABVq1bFN7feCR0llqoejq4kZa VHeKRgyX+40D/QPsoCBrEMruV+/vixEVJMLIsw1QlSl+65q6Wnm2TRUvnw/LlXW8sgPJ Rt5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=FJMgoWFRQbTdTclL4lnyqV3sb9oHnrp3+xGX6HY55ww=; b=QZ1F0ARND3B19kgT2DFZejOhTZWH3Ob/F1sm+r+OgUO8mXYaUbEE4pJKkV+ltBLS95 KZ5+vzgat7W4mR1OmuTezAx8GDQxy9ktKOog2oZF6WO3JGgS9YuXLoasWTF/0a4+BhNP Vfnyjl2ppU8pjUT+gQ9fWuYPXuEtmyDorBlwg7Dzucwq0YOYAm726MzVfaTnNNuDhCh1 W0LBz9QiueePLnmGrwDK2A7hCPejw0xTuxozfmXMzC5/6OSWfixUdw8HT7117eqv//tm QVDFjp99r5gs3t8gGssScGSDZBCSrQF3pXaXb/MXvT5+zJpNxKsEpV9IwTpY8ZJcbF8M 8SRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VZgdnklj; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si12953854pgk.56.2019.02.18.06.34.25; Mon, 18 Feb 2019 06:34:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=VZgdnklj; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388339AbfBROeZ (ORCPT + 3 others); Mon, 18 Feb 2019 09:34:25 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55922 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732776AbfBROeY (ORCPT ); Mon, 18 Feb 2019 09:34:24 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190218143422euoutp01d5768460badb8b16159d34b2aea166d7~Ee-S3iko91432914329euoutp01I; Mon, 18 Feb 2019 14:34:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190218143422euoutp01d5768460badb8b16159d34b2aea166d7~Ee-S3iko91432914329euoutp01I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550500462; bh=FJMgoWFRQbTdTclL4lnyqV3sb9oHnrp3+xGX6HY55ww=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=VZgdnkljwnDodkc4NsIG4stxMJNuT+kz5vYuYffxa3KtEcVxhFOIX0YUX6TlYw5yt 4C6k7A8lyF/BDaN0VX2HoiNPD1XKtaWqinqAB4fknm4LUBDMwCvfK4odKPSxaG7ZE7 P+NVda5gOoWaA78LPj3MumyHZRZO9ir7zc0qfh+Q= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190218143422eucas1p12400f5e119ed6eb15547323721e806cc~Ee-Sc1_Xs2004220042eucas1p1M; Mon, 18 Feb 2019 14:34:22 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 8D.66.04806.D62CA6C5; Mon, 18 Feb 2019 14:34:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190218143421eucas1p2c2b7c9417006d71e20af936715eb0caa~Ee-RzzwOc3177231772eucas1p2X; Mon, 18 Feb 2019 14:34:21 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-22-5c6ac26d7d9b Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A1.8B.04284.D62CA6C5; Mon, 18 Feb 2019 14:34:21 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PN400ECCLT2NV10@eusync1.samsung.com>; Mon, 18 Feb 2019 14:34:21 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Joonyoung Shim , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz , Seung-Woo Kim Subject: [PATCH 1/4] ARM: exynos: Move Exynos542x CPU state reset to pm_prepare() Date: Mon, 18 Feb 2019 15:34:09 +0100 Message-id: <20190218143412.6865-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190218143412.6865-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRmVeSWpSXmKPExsWy7djPc7q5h7JiDLa22FpsnLGe1eL6l+es Fi/uXWSxOH9+A7vFjPP7mCzWHrkLZE1+yebA7rFpVSebR9+WVYwenzfJBTBHcdmkpOZklqUW 6dslcGV8avvCVLCAq2LW2m7mBsarHF2MnBwSAiYSk6+9Yepi5OIQEljBKLG85z4bhPOZUeLQ +l5mmKquF/OYIRLLGCXONE+Eqmpgkjh9dS0TSBWbgKFE19suNhBbREBV4nPbAnaQImaBLiaJ tp3TWUESwgLBEr03vgEVcXCwABUt+1cOEuYVsJG4uqKJEWKbvMTqDQfANnMK2Eps793EAjJH QuAjq8Spx89YIIpcJDqbv0CdJyPR2XGQCaKomVGifcYsdginh1Fi65wdbBBV1hKHj18Eu4JZ gE9i0rbpzCBXSAjwSnS0CUGUeEjMaNgINlRIYAKjxIRfSkByASPDKkbx1NLi3PTUYuO81HK9 4sTc4tK8dL3k/NxNjMC4Ov3v+NcdjPv+JB1iFOBgVOLhXbA8K0aINbGsuDL3EKMEB7OSCO+p A0Ah3pTEyqrUovz4otKc1OJDjNIcLErivNUMD6KFBNITS1KzU1MLUotgskwcnFINjCmRDJKr xVSkwm6nHuzgn2y0osTEib3nv8f6mtcORzfvtl/GnvnkesEz96PTk/JVeQvv6V25cZQj+edG bxfDI9N+Bnxu46gX/VPl5vI4eX607bOod15P2N5k6gcvvH+l7PRR6c0lwS/li5QuL/Fc0JWU eY6Fab/+rPltCyJVt7HevNNT+GbbVSWW4oxEQy3mouJEAOA59yWnAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDJMWRmVeSWpSXmKPExsVy+t/xy7q5h7JiDFZfV7TYOGM9q8X1L89Z LV7cu8hicf78BnaLGef3MVmsPXIXyJr8ks2B3WPTqk42j74tqxg9Pm+SC2CO4rJJSc3JLEst 0rdL4Mr41PaFqWABV8Wstd3MDYxXOboYOTkkBEwkul7MY+5i5OIQEljCKPFo3jtGCKeJSeLB pFNsIFVsAoYSXW+7wGwRAVWJz20L2EGKmAV6mCTuf3rEApIQFgiW6L3xDaiIg4MFqGjZv3KQ MK+AjcTVFU2MENvkJVZvOMAMYnMK2Eps793EAlIuBFSzeln1BEaeBYwMqxhFUkuLc9Nziw31 ihNzi0vz0vWS83M3MQLDZNuxn5t3MF7aGHyIUYCDUYmHd8HyrBgh1sSy4srcQ4wSHMxKIryn DgCFeFMSK6tSi/Lji0pzUosPMUpzsCiJ8543qIwSEkhPLEnNTk0tSC2CyTJxcEo1MHbOWZOy /8L3m0ZFTJmrzFcItD8R+BZp6S7DtfSOxWyjexsKGh1ePTee5Mefpngz/CB7vXAhW2Ghc3Nq jQ7vx916i+tk/jbuWVd1ea2MW/PRmzFVypuS32VNzVntW/TpxY3KJIGP76OYVTza5H6v/+Ka WbFh7ToHLVmfE69srZ8ESu3OvT0jTomlOCPRUIu5qDgRAOcu52kPAgAA X-CMS-MailID: 20190218143421eucas1p2c2b7c9417006d71e20af936715eb0caa CMS-TYPE: 201P X-CMS-RootMailID: 20190218143421eucas1p2c2b7c9417006d71e20af936715eb0caa References: <20190218143412.6865-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Reset the CPU state entry in sysram in pm_prepare() callback. That entry doesn't need to be reset for every suspended CPU, so make it symmetic with the code, which restores it in pm_resume() callback. Tested on Samsung Chromebook2 Pit (Exynos5420) and Pi (Exynos5800) boards. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/suspend.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 0850505ac78b..c1e082ab2a1e 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -265,8 +265,6 @@ static int exynos5420_cpu_suspend(unsigned long arg) unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); - writel_relaxed(0x0, pm_state.sysram_base + EXYNOS5420_CPU_STATE); - if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) { mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); mcpm_cpu_suspend(); @@ -341,6 +339,7 @@ static void exynos5420_pm_prepare(void) */ pm_state.cpu_state = readl_relaxed(pm_state.sysram_base + EXYNOS5420_CPU_STATE); + writel_relaxed(0x0, pm_state.sysram_base + EXYNOS5420_CPU_STATE); exynos_pm_enter_sleep_mode();