From patchwork Mon Jun 2 12:35:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 4281641 Return-Path: X-Original-To: patchwork-linux-arm@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 9A957BEEA7 for ; Mon, 2 Jun 2014 12:39:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90142203B4 for ; Mon, 2 Jun 2014 12:39:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C3DA203AB for ; Mon, 2 Jun 2014 12:39:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WrRUm-0007il-L0; Mon, 02 Jun 2014 12:37:44 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WrRUk-0007RE-H5 for linux-arm-kernel@lists.infradead.org; Mon, 02 Jun 2014 12:37:42 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N6J009SAKE9BZD0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 02 Jun 2014 21:37:21 +0900 (KST) X-AuditID: cbfee61a-b7fef6d00000200b-d1-538c7001838c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 38.D7.08203.1007C835; Mon, 02 Jun 2014 21:37:21 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N6J007MFKBF0910@mmp2.samsung.com>; Mon, 02 Jun 2014 21:37:20 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Kukjin Kim Subject: [PATCH v2 5/7] ARM: EXYNOS: PM: use c15resume firmware method if secure firmware is enabled Date: Mon, 02 Jun 2014 14:35:41 +0200 Message-id: <1401712543-14281-6-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1401712543-14281-1-git-send-email-b.zolnierkie@samsung.com> References: <1401712543-14281-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCLMWRmVeSWpSXmKPExsVy+t9jQV3Ggp5gg6ff2C02zljPajHvs6xF 74KrbBZnm96wW7w/9IzZYtPja6wWl3fNYbP43HuE0WLG+X1MFmdOX2K1OPmnl9Fi/YzXLBYb v3o48HrcubaHzWPzknqP2/8eM3tsudrO4tG3ZRWjx+dNcgFsUVw2Kak5mWWpRfp2CVwZU853 MRU84aiYeKaRuYFxHXsXIyeHhICJRNOEK6wQtpjEhXvr2boYuTiEBKYzSpyevBnK6WKSaLv/ nwWkik3ASmJi+ypGEFtEQE2iZ/FWRpAiZoG9zBJLuzeBjRUWSJNobDnH1MXIwcEioCoxdX0N SJhXwENiYXcPI8Q2RYnuZxPYQGxOAU+Jlfcegl0hBFSz79UupgmMvAsYGVYxiqYWJBcUJ6Xn GuoVJ+YWl+al6yXn525iBIflM6kdjCsbLA4xCnAwKvHw/lTvCRZiTSwrrsw9xCjBwawkwrvU AijEm5JYWZValB9fVJqTWnyIUZqDRUmc90CrdaCQQHpiSWp2ampBahFMlomDU6qBMWLvNevp Sz/q/GXZa/H4ZNTUsL+Fat5sn/YkXa7gY/r13/FiQlP4Xpsrrw/+f+xxac0mC0bWqz7T7oUd nfez9+JGwVNreQsZuVO0ky8JLmVf22Muob/F9a7DItNZhYHPsuxv6HbmvS/466bxIlxlS6mC 4c7fvB1ZDgtCmjxzyqqzLT6o5rDwK7EUZyQaajEXFScCAM5JirVHAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140602_053742_732494_21D81C2F X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.7 (-----) Cc: linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, Sachin Kamat , Viresh Kumar , Tomasz Figa , Daniel Lezcano , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Kyungmin Park , linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, b.zolnierkie@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Use c15resume firmware method instead of accessing the registers directly in exynos_cpu_restore_register() if secure firmware is enabled. This affects both PM resume method and cpuidle AFTR mode. This patch shouldn't cause any functionality changes on boards that don't use secure firmware. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park --- arch/arm/mach-exynos/pm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index cf09383..aeff99e 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -232,6 +233,9 @@ static void exynos_cpu_restore_register(void) { unsigned long tmp; + if (call_firmware_op(c15resume, save_arm_register) == 0) + return; + /* Restore Power control register */ tmp = save_arm_register[0];