From patchwork Tue Apr 29 01:37:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 4084121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A474D9F271 for ; Tue, 29 Apr 2014 01:41:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1E97201CE for ; Tue, 29 Apr 2014 01:41:50 +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 A983D201BC for ; Tue, 29 Apr 2014 01:41:49 +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 1Wewzz-0000xC-Q2; Tue, 29 Apr 2014 01:38:19 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wewzw-0000nK-QJ for linux-arm-kernel@lists.infradead.org; Tue, 29 Apr 2014 01:38:17 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4R009RPR73YW50@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 29 Apr 2014 10:37:51 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.114]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 4C.80.18501.C620F535; Tue, 29 Apr 2014 10:37:49 +0900 (KST) X-AuditID: cbfee68d-b7f4e6d000004845-61-535f026c334b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 9B.10.25708.C620F535; Tue, 29 Apr 2014 10:37:48 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4R008YPR705100@mmp1.samsung.com>; Tue, 29 Apr 2014 10:37:48 +0900 (KST) From: Chanwoo Choi To: kgene.kim@samsung.com, t.figa@samsung.com Subject: [PATCHv5] ARM: EXYNOS: Support secondary CPU boot of Exynos4212 Date: Tue, 29 Apr 2014 10:37:42 +0900 Message-id: <1398735462-1938-1-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsWyRsSkSDeXKT7Y4PQydovL+7Utrn95zmrx +UMLu8Wk+xNYLHoXXGWzONv0ht1i0+NrrBaXd81hs5hxfh+Txe3LvBYzJr9ks1g/4zWLxd6d kxkdeD1amnvYPDYvqffo27KK0ePzJrkAligum5TUnMyy1CJ9uwSujHm777IXXOOpmLect4Fx E1cXIyeHhICJxKsls1kgbDGJC/fWs3UxcnEICSxllLg67SM7TNH3SxeYIBKLGCUeHXgO5TQx SSw5OYERpIpNQEti/4sbbCC2iICuxJSZd1hBipgFNjNJvF25nBkkISzgIfH1/i6wBhYBVYkv ez6wgti8Ai4S3w52MUOsk5P4sOcR1Opl7BKr7lpA1AtIfJt8COhWDqC4rMSmA1DlkhIHV9xg mcAouICRYRWjaGpBckFxUnqRoV5xYm5xaV66XnJ+7iZGYIif/vesdwfj7QPWhxiTgcZNZJYS Tc4HxkheSbyhsZmRhamJqbGRuaUZacJK4rxJD5OChATSE0tSs1NTC1KL4otKc1KLDzEycXBK NTCWlf2L/77S5FrvAyPfJXrmi6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: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140428_183817_038566_6DEFDEEA X-CRM114-Status: GOOD ( 11.35 ) X-Spam-Score: -5.6 (-----) Cc: linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, hyunhee.kim@samsung.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, yj44.cho@samsung.com, inki.dae@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, chanho61.park@samsung.com, linux-arm-kernel@lists.infradead.org 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 From: Kyungmin Park This patch fix the offset of CPU boot address and change parameter of smc call of SMC_CMD_CPU1BOOT command for Exynos4212. Signed-off-by: Kyungmin Park Signed-off-by: Chanwoo Choi Reviewed-by: Tomasz Figa --- Changes from v4: - Post only this patch separated from following patchset[1] [1] https://lkml.org/lkml/2014/4/24/873 arch/arm/mach-exynos/firmware.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 932129e..aa01c42 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -18,6 +18,8 @@ #include +#include + #include "smc.h" static int exynos_do_idle(void) @@ -28,13 +30,24 @@ static int exynos_do_idle(void) static int exynos_cpu_boot(int cpu) { + /* + * The second parameter of SMC_CMD_CPU1BOOT command means CPU id. + * But, Exynos4212 has only one secondary CPU so second parameter + * isn't used for informing secure firmware about CPU id. + */ + if (soc_is_exynos4212()) + cpu = 0; + exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0); return 0; } static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr) { - void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c + 4*cpu; + void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c; + + if (!soc_is_exynos4212()) + boot_reg += 4*cpu; __raw_writel(boot_addr, boot_reg); return 0;