From patchwork Mon Sep 24 14:28:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1498151 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 416D2DF280 for ; Mon, 24 Sep 2012 14:32:58 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TG9g0-0005ty-Fl; Mon, 24 Sep 2012 14:30:24 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TG9em-0005Ul-Kw for linux-arm-kernel@lists.infradead.org; Mon, 24 Sep 2012 14:29:15 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAU004SPYVRKX10@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 24 Sep 2012 23:29:07 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-51-50606e330cb5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B4.88.03860.33E60605; Mon, 24 Sep 2012 23:29:07 +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 <0MAU0018OYVOXC80@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 24 Sep 2012 23:29:07 +0900 (KST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 6/6] ARM: EXYNOS: Add secure firmware support to secondary CPU bring-up Date: Mon, 24 Sep 2012 16:28:33 +0200 Message-id: <1348496913-25422-7-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1348496913-25422-1-git-send-email-t.figa@samsung.com> References: <1348496913-25422-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jAV3jvIQAg4PrFSw2Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfGks1LWQpuc1UsvbmTtYHxF0cXIyeHhICJRPeCKawQtpjEhXvr 2UBsIYFFjBIblsh3MXIB2ZuZJJZ+nc8EkmATUJP43PAIrEhEQFXic9sCdpAiZoHDjBLXVl4E myQsECnxeedvsCIWoKKZW1pYQGxeASeJV62vmCG2yUs8vd8HVMPBwSngLLHvVDDEYieJxkvT GScw8i5gZFjFKJpakFxQnJSea6RXnJhbXJqXrpecn7uJEezxZ9I7GFc1WBxiFOBgVOLh3XAm PkCINbGsuDL3EKMEB7OSCO/RxIQAId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rzCnwIDhATSE0tS s1NTC1KLYLJMHJxSDYyKL70W7tnleMjmsZSu+FyzK8EMfYvfBOtv+6X1Wp9drmjfwrt/I1L7 bX/t2v7j2ivn3XHZL5+seDu1+aHqr8+nQu+ELmAwFTz95MKaS6abombtyJirfHkG39bz31dy qHQVSliUh8suCz9zz9zKROIz7zK7Zzle0u2F/FuuzDWaUFCYln2S+clvJZbijERDLeai4kQA 5ToVcvQBAAA= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.8 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, 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 a7f4031..4a18250 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 @@ -44,6 +45,8 @@ static inline void __iomem *cpu_boot_reg_base(void) 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; @@ -153,6 +156,10 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) __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), 1); if (pen_release == -1)