From patchwork Fri Apr 25 01:16:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 29028 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D1F7E2036A for ; Fri, 25 Apr 2014 01:17:29 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf18404856iec.4 for ; Thu, 24 Apr 2014 18:17:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:dlp-filter:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=t5OiMmFH6Vg860aG82kkPNOaM9DukkSErHm7hrBAf0E=; b=OilLqrjqRg/fM7IKjrqfUR02ozFAl9KgJKJGX2SjkeJfwiKLBziyCAMHsGPKR2RXat a1S3fvFMHmRDnMMS6M9CVyxG5zoTEcZGsAXHRVAUA8E0+v/oer7EHr/ySs7rDdfUAeEg 4uY3F5ZYjm+9g7WLScRiX49ZuDoUubjIfo1LtxRlAg3cennL/olyGIKDnU/BgJDPynHc pqXJeIWr4G3ZvAtfVrsjeJ9H74QSRihFUtHJNfHORJwGrtn0pag2QG+pHSgGrR/bQ8LP Y9eLrhGFUPTlG/CYRpb+j6lFNyVCEuQpUEqTf01VH6NMlxBTXWDvIYLrXL3F1eqtdSfc potQ== X-Gm-Message-State: ALoCoQkEtenqXU/l9GrVv0inBrYDMq00dq9jRz4jqaXDm9GyL8n54CMS0FaH0hg4p5Pm+5d5bn9i X-Received: by 10.182.104.200 with SMTP id gg8mr3021126obb.45.1398388649102; Thu, 24 Apr 2014 18:17:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.201 with SMTP id f67ls1419394qgd.91.gmail; Thu, 24 Apr 2014 18:17:28 -0700 (PDT) X-Received: by 10.52.37.196 with SMTP id a4mr3252167vdk.33.1398388648962; Thu, 24 Apr 2014 18:17:28 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id k20si1353727vcm.205.2014.04.24.18.17.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 18:17:28 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so3807922veb.40 for ; Thu, 24 Apr 2014 18:17:28 -0700 (PDT) X-Received: by 10.52.6.162 with SMTP id c2mr3278175vda.6.1398388648867; Thu, 24 Apr 2014 18:17:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp59300vcb; Thu, 24 Apr 2014 18:17:28 -0700 (PDT) X-Received: by 10.68.143.231 with SMTP id sh7mr7551977pbb.7.1398388647914; Thu, 24 Apr 2014 18:17:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ck1si3673420pad.204.2014.04.24.18.17.26; Thu, 24 Apr 2014 18:17:26 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751376AbaDYBRK (ORCPT + 9 others); Thu, 24 Apr 2014 21:17:10 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:39160 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbaDYBQW (ORCPT ); Thu, 24 Apr 2014 21:16:22 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4K00EC6BJ4IR40@mailout2.samsung.com>; Fri, 25 Apr 2014 10:16:16 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.114]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 1B.75.18501.067B9535; Fri, 25 Apr 2014 10:16:16 +0900 (KST) X-AuditID: cbfee68d-b7f4e6d000004845-e8-5359b7602370 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D3.DF.27725.067B9535; Fri, 25 Apr 2014 10:16:16 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4K00ALCBJ2RP20@mmp2.samsung.com>; Fri, 25 Apr 2014 10:16:15 +0900 (KST) From: Chanwoo Choi To: kgene.kim@samsung.com, t.figa@samsung.com Cc: linux-kernel@vger.kernel.org, linux@arm.linux.org.uk, ben-linux@fluff.org, arnd@arndb.de, olof@lixom.net, marc.zyngier@arm.com, thomas.abraham@linaro.org, kyungmin.park@samsung.com, cw00.choi@samsung.com, inki.dae@samsung.com, sw0312.kim@samsung.com, hyunhee.kim@samsung.com, yj44.cho@samsung.com, chanho61.park@samsung.com, sajjan.linux@gmail.com, tushar.behera@linaro.org, sachin.kamat@linaro.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCHv4 2/7] ARM: EXYNOS: Support secondary CPU boot of Exynos4212 Date: Fri, 25 Apr 2014 10:16:07 +0900 Message-id: <1398388572-30239-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1398388572-30239-1-git-send-email-cw00.choi@samsung.com> References: <1398388572-30239-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKIsWRmVeSWpSXmKPExsWyRsSkSDdhe2SwwfSPBhZ/Jx1jt5i07gCT xeX92hbXvzxntZh/5ByrxecPLUDx+xNYLHoXXGWzONv0ht1i0+NrrBaXd81hs5hxfh+Txe3L vBZ/7/xjszh1/TObxck/vYwWTw5/ZLWYMfklm8X6Ga9ZLI7NWMJo0f53L5vF3p2TGR3EPNbM W8Po0dLcw+bx+9ckRo+/q14we+ycdZfd4861PWwem5fUe1w50cTq0bdlFaPH501yAVxRXDYp qTmZZalF+nYJXBmNTQsZC9ZyVzzomMTcwLiQs4uRk0NCwETi55V+FghbTOLCvfVsXYxcHEIC Sxkl7n75ywxT1Pq8nRUiMZ1R4teXfYwQThOTxPT179lBqtgEtCT2v7jBBmKLCOhKTJl5hxXE ZhZoZZHo21LTxcjBISzgI3H3XgVImEVAVWLm0ldMIGFeAVeJORtLIXbJSXzY8whsIqeAm8TO XRAlQkAlS/94gGyVEFjJIXH3ZysrxBgBiW+TD7GA1EgIyEpsOgB1sqTEwRU3WCYwCi9gZFjF KJpakFxQnJReZKhXnJhbXJqXrpecn7uJERilp/89693BePuA9SHGZKBxE5mlRJPzgVGeVxJv aGxmZGFqYmpsZG5pRpqwkjhv0sOkICGB9MSS1OzU1ILUovii0pzU4kOMTBycUg2MIR1ZHvFL v/w37Vz2qe/So6MNvsxtcrJxMZ8m3VPrbyvwL1t3w+bHLV8j2czf0rm2yfuubygxsDof17s+ QuZP+kyDK4HfkrW3mYZdmWfyYW0481zn4oLYto7pCmy/9z/2Y57Mv0HA8avzhJWti9csb946 IXH+1KMJBb8/y7jWpK585bxoYuwOJZbijERDLeai4kQADcyk1ugCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEKsWRmVeSWpSXmKPExsVy+t9jQd2E7ZHBBkdmqlr8nXSM3WLSugNM Fpf3a1tc//Kc1WL+kXOsFp8/tADF709gsehdcJXN4mzTG3aLTY+vsVpc3jWHzWLG+X1MFrcv 81r8vfOPzeLU9c9sFif/9DJaPDn8kdVixuSXbBbrZ7xmsTg2YwmjRfvfvWwWe3dOZnQQ81gz bw2jR0tzD5vH71+TGD3+rnrB7LFz1l12jzvX9rB5bF5S73HlRBOrR9+WVYwenzfJBXBFNTDa ZKQmpqQWKaTmJeenZOal2yp5B8c7x5uaGRjqGlpamCsp5CXmptoqufgE6Lpl5gA9qqRQlphT ChQKSCwuVtK3wzQhNMRN1wKmMULXNyQIrsfIAA0krGHMaGxayFiwlrviQcck5gbGhZxdjJwc EgImEq3P21khbDGJC/fWs3UxcnEICUxnlPj1ZR8jhNPEJDF9/Xt2kCo2AS2J/S9usIHYIgK6 ElNm3gHrZhZoZZHo21LTxcjBISzgI3H3XgVImEVAVWLm0ldMIGFeAVeJORtLIXbJSXzY8whs IqeAm8TOXRAlQkAlS/94TGDkXcDIsIpRNLUguaA4KT3XUK84Mbe4NC9dLzk/dxMjOAU8k9rB uLLB4hCjAAejEg/vB7XIYCHWxLLiytxDjBIczEoivMqrgEK8KYmVValF+fFFpTmpxYcYk4Fu msgsJZqcD0xPeSXxhsYmZkaWRuaGFkbG5qQJK4nzHmi1DhQSSE8sSc1OTS1ILYLZwsTBKdXA yBi1ZDZf1eLFDxadXHLma4HAwaprH7UfL5uZO9kwxMXy/yVxrtOC76v25pp9vHrvpPm6LxcY bnj2JZ8TY4sx/WWw9tn/Vfe2vn7ML3E7heeCp5Go7rn0DTN/q6RH6Ts7T8sTSj7yPFXT9sb1 5UU3rJ+zbpb10pZIeM715ID7/B1b5C4Xz177SFmJpTgj0VCLuag4EQAr00rIRQMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: cw00.choi@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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;