From patchwork Wed May 28 04:13:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 4252521 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 C5D2A9F32B for ; Wed, 28 May 2014 04:18:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 07B59202C8 for ; Wed, 28 May 2014 04:18:36 +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 2A66F202A7 for ; Wed, 28 May 2014 04:18:35 +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 1WpVHI-0003zl-OH; Wed, 28 May 2014 04:15:48 +0000 Received: from mail-pa0-f47.google.com ([209.85.220.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpVHF-0003yz-Rp for linux-arm-kernel@lists.infradead.org; Wed, 28 May 2014 04:15:46 +0000 Received: by mail-pa0-f47.google.com with SMTP id lf10so10234956pab.6 for ; Tue, 27 May 2014 21:15:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BMhZISmokj70TVy9W4IFNtveqMvgc5hbpN8rXB076EE=; b=FV6PM6+w3IE6Pd7VtnMqHlrv5hxdMXTG6BueMpNXlvPbcnfHpuIBghNSpM1zIyDVQh EXz24tNGJ8S29VNIubPrcbg8N3c6zjlRlF9J/weQgY5dssO302oXAYyMdN29xvOQf+jF XsmR++YRTgg3fWxpxkYbtTDJF5nb2v38HrPcxy+4ttsFdFIFECUS7tZuZvqxQWNRc+JQ vsJhSqKrRNqUQp5WyF8jsWAXG/btXKD+WimEzQiGJYqQ0Qq5hiVfpP65IHLFXEX1dbHI ORwBmclLoFMh/DpHvJO0TBfOW3ikYnDxvXi2EzYveJRpuAk5+DtrCfkdgo1z9qU/uIMB tsFw== X-Gm-Message-State: ALoCoQnZOLBoAU3Xi3qqcmRz7OOZFTP5TUhWz5HBsqqo6VSn7ivouHLgB0ZufJZEtjyucJXH/gWL X-Received: by 10.68.134.198 with SMTP id pm6mr42829240pbb.9.1401250524244; Tue, 27 May 2014 21:15:24 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id qb6sm82466228pac.12.2014.05.27.21.15.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 May 2014 21:15:23 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 Resend 1/2] ARM: EXYNOS: Update secondary boot addr for secure mode Date: Wed, 28 May 2014 09:43:01 +0530 Message-Id: <1401250382-24046-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140527_211545_954623_D5DC931A X-CRM114-Status: GOOD ( 11.56 ) X-Spam-Score: -0.7 (/) Cc: sachin.kamat@linaro.org, kgene.kim@samsung.com, tomasz.figa@gmail.com, linux-arm-kernel@lists.infradead.org, tushar.behera@linaro.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 Almost all Exynos-series of SoCs that run in secure mode don't need additional offset for every CPU, with Exynos4412 being the only exception. Tested on Origen-Quad (Exynos4412) and Arndale-Octa (Exynos5420). While at it, fix the coding style (space around *). Signed-off-by: Sachin Kamat Signed-off-by: Tushar Behera Tested-by: Andreas Färber --- arch/arm/mach-exynos/firmware.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index eb91d2350f8c..e8797bb78871 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -57,8 +57,13 @@ static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr) boot_reg = sysram_ns_base_addr + 0x1c; - if (!soc_is_exynos4212() && !soc_is_exynos3250()) - boot_reg += 4*cpu; + /* + * Almost all Exynos-series of SoCs that run in secure mode don't need + * additional offset for every CPU, with Exynos4412 being the only + * exception. + */ + if (soc_is_exynos4412()) + boot_reg += 4 * cpu; __raw_writel(boot_addr, boot_reg); return 0;