From patchwork Thu Sep 13 08:13:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1450861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (unknown [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 4A008402E1 for ; Thu, 13 Sep 2012 08:28:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TC4Zj-0005Lx-9E; Thu, 13 Sep 2012 08:15:03 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TC4ZD-0005HD-6Q for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 08:14:32 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAA00L2C46GO2V0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 17:14:19 +0900 (KST) X-AuditID: cbfee61a-b7fba6d000007d5f-22-505195db4442 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 11.91.32095.BD591505; Thu, 13 Sep 2012 17:14:19 +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 <0MAA00F0A477MEF1@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 17:14:19 +0900 (KST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 5/5] ARM: EXYNOS: Add secure firmware support to secondary CPU bring-up Date: Thu, 13 Sep 2012 10:13:38 +0200 Message-id: <1347524018-19301-6-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1347524018-19301-1-git-send-email-t.figa@samsung.com> References: <1347524018-19301-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jAd3bUwMDDJZPErTY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZ5yavYSzYwVOx685UpgbGXVxdjBwcEgImEkevqHYxcgKZYhIX 7q1n62Lk4hASWMQosaavgx3C2cwk8b1jBTNIFZuAmsTnhkdsILaIgKrE57YFYEXMAisZJTa+ mweWEBaIlNjc9p0JZAMLUFH3HUGQMK+Ak0TT3A1MENvkJZ7e7wMr5xRwlvjwYAsjiC0EVLPl 8DOWCYy8CxgZVjGKphYkFxQnpeca6hUn5haX5qXrJefnbmIEe/yZ1A7GlQ0WhxgFOBiVeHgz nwcECLEmlhVX5h5ilOBgVhLhVe8ODBDiTUmsrEotyo8vKs1JLT7EKM3BoiTO63TOLkBIID2x JDU7NbUgtQgmy8TBKdXAKDFh/0/Jy9xeIm/naD00dmyLlZO6bNK90ONuU63hy9IffFumOe40 mD9x57YLF44qlOqF+e57vmrfIcsjPguirn87vEznD2tyfmSbaapuDJOD0w1frRPdJyb6sVxc Y2w487ZnoFcFs73XTLnmvd8SJj5rTbt5b3vmE0GbhjlvHUMDUsMun5j2TImlOCPRUIu5qDgR AMTXf4P0AQAA X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.3 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.3 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.4 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 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. This is a follow-up on the patch by Kyungmin Park: [PATCH v5 2/2] ARM: EXYNOS: SMC instruction (aka firmware) support http://thread.gmane.org/gmane.linux.ports.arm.kernel/183608/focus=184109 Signed-off-by: Kyungmin Park Signed-off-by: Tomasz Figa --- arch/arm/mach-exynos/platsmp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 816a27d..9d65b1b 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 @@ -43,6 +44,9 @@ static inline void __iomem *cpu_boot_reg_base(void) static inline void __iomem *cpu_boot_reg(int cpu) { + void __iomem *fw_boot_reg = call_firmware_op(cpu_boot_reg, cpu); + if (fw_boot_reg) + return fw_boot_reg; if (soc_is_exynos4412()) return cpu_boot_reg_base() + 4*cpu; return cpu_boot_reg_base(); @@ -151,6 +155,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)