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: 4252501 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5BA7ABF90B for ; Wed, 28 May 2014 04:15:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CFCA202E5 for ; Wed, 28 May 2014 04:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EB6B202C8 for ; Wed, 28 May 2014 04:15:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750775AbaE1EPZ (ORCPT ); Wed, 28 May 2014 00:15:25 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:44642 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbaE1EPY (ORCPT ); Wed, 28 May 2014 00:15:24 -0400 Received: by mail-pa0-f48.google.com with SMTP id rd3so10253347pab.7 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=Pqcs0yCfv4CydRTXeCM58fq3A+xwBcOA3OenB3Xc4SvBXDILSaEO9CrvIYXpEbMwAk P2HtCUenNQXEg0HsxIuIcPWXBzB+kCl1HtVfRBTRopUpEJycg0c/WzyZuJwbwvYKiZhq bo5GSCoqiMF/uC4v6fXK9j21BWg9pkDMtb76qXFJXB7d81nXtqZtV8c8aR6txFwjo6mo gjQLTCEIP2bIZArX9R7JV6NxzkfjgqveQcnJwAKp4JexUdiQfCnKuDlZFgZgXi0RigK8 Jm0M/DiPds3/17w454hkXdVG8/FM5CtPT3cFv1goV+VrsE6Jp1zOPyfuvF3ZJ9HGoDal 0JSA== X-Gm-Message-State: ALoCoQmxhT7p7CXfv+gFirFTdz+sSED8DOzGdQt3NAC+Ob/vkEK55Z9i9MPG8YIFTH/CjjtjXGIp 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 Cc: linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com, tushar.behera@linaro.org, sachin.kamat@linaro.org, tomasz.figa@gmail.com 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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;