From patchwork Thu Oct 25 15:22:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1645371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 572363FC36 for ; Thu, 25 Oct 2012 15:26:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TRPId-0005D6-JJ; Thu, 25 Oct 2012 15:24:47 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TRPH9-0004fh-Pu for linux-arm-kernel@lists.infradead.org; Thu, 25 Oct 2012 15:23:16 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCG00L3YG23WU40@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 26 Oct 2012 00:23:14 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-69-508959620204 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 15.48.12699.26959805; Fri, 26 Oct 2012 00:23:14 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MCG008XQG1VUL00@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 26 Oct 2012 00:23:14 +0900 (KST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v3 6/6] ARM: EXYNOS: Add secure firmware support to secondary CPU bring-up Date: Thu, 25 Oct 2012 17:22:40 +0200 Message-id: <1351178560-19188-7-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1351178560-19188-1-git-send-email-t.figa@samsung.com> References: <1351178560-19188-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jAd2kyM4Ag60bLSw2Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfGwg9fWQvWc1XMXzefrYHxEkcXIyeHhICJxIaWZWwQtpjEhXvr gWwuDiGBRYwS/573MkI4m5kkXn1bxwhSxSagJvG54RFYh4iAqsTntgXsIEXMArcYJQ7f/AtW JCwQI9Hw9QGYzQJUdG/VDjCbV8BJYm/nGiaIdfIST+/3gQ3iFHCWaDp8GSjOAbTNSeL/AekJ jLwLGBlWMYqmFiQXFCel5xrpFSfmFpfmpesl5+duYgT7/Jn0DsZVDRaHGAU4GJV4eB+4dgYI sSaWFVfmHmKU4GBWEuH1DQcK8aYkVlalFuXHF5XmpBYfYpTmYFES5232SAkQEkhPLEnNTk0t SC2CyTJxcEo1MHZbRU99cNeUV8w12oBDO7Ns/59FbOKZOsaq6018ZuzZKdKU+LP11LfmROGk 3X8M9v5/md4nE9Il0p7V/TxCmauu6sGk/GMziu7ujrXceqQsNbrLQvGtxuFV9cflbpa3OSXN l/ZuyN36VDH65OLyfpf4InVfVZ7Jbzfcn8YyT0PFzNcqzH+JEktxRqKhFnNRcSIAQA10QvUB AAA= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, arnd@arndb.de, t.figa@samsung.com, tomasz.figa@gmail.com, kyungmin.park@samsung.com, olof@lixom.net, linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Boards using secure firmware must use different CPU boot registers and call secure firmware to boot the CPU. Signed-off-by: Kyungmin Park Signed-off-by: Tomasz Figa --- arch/arm/mach-exynos/platsmp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 4ca8ff1..9f8bdaf 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -47,6 +48,8 @@ static inline void __iomem *cpu_boot_reg(int cpu) { void __iomem *boot_reg; + if (!call_firmware_op(cpu_boot_reg, cpu, &boot_reg)) + return boot_reg; boot_reg = cpu_boot_reg_base(); if (soc_is_exynos4412()) boot_reg += 4*cpu; @@ -149,6 +152,10 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct __raw_writel(virt_to_phys(exynos4_secondary_startup), cpu_boot_reg(phys_cpu)); + + /* Call Exynos specific smc call */ + call_firmware_op(cpu_boot, phys_cpu); + gic_raise_softirq(cpumask_of(cpu), 0); if (pen_release == -1)