From patchwork Tue May 20 03:50:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 4207211 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 A1C5A9F32A for ; Tue, 20 May 2014 03:52:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA7B9202F0 for ; Tue, 20 May 2014 03:52:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C48AF202A7 for ; Tue, 20 May 2014 03:52:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750922AbaETDwP (ORCPT ); Mon, 19 May 2014 23:52:15 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33865 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbaETDwO (ORCPT ); Mon, 19 May 2014 23:52:14 -0400 Received: by mail-pa0-f54.google.com with SMTP id bj1so6713033pad.27 for ; Mon, 19 May 2014 20:52:14 -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=oEN82Vq52AG/x4DlmHiEv/BfOP6bNyLdfprwjOfQV5Y=; b=AC+z9W4+IMpV6YpiN6o+RFCsNODm2Wzru6J/8TV9A0/TMqc/N0gPKGncrcRRZMche8 75RQGUgJOO+VeZfM6l7Yb/JnEaMXkWGBdsXOw8XbTpfNYXkPI1p37JrXsWR4tiLZ7ZXz 8HY1wIHMy6ShlPlVnZjM/9r/CmYPDDB0F+KCO0lUL5FEe4i+QMjdrjwyVlcaVocbVGAb CTNc6z9qNGGDiyhRoUoxfN02UArcFWX5RnVoaGpitfHoWqXh1RZUaJkRIpqsnBir0rVY TieTgpk2B70d6gDnhQHrgx5buLpMCWIS4J6Pj/6UR159VqNjXFmRUjd5b1NIqvOR9IG7 sm1w== X-Gm-Message-State: ALoCoQl/OYuSPIEEdySuCsUJPM1r0Cmm370Hc/kZiOSXSHYSPlHr7Cu9jmjOlCq2BXCsMmfPVzj9 X-Received: by 10.68.139.71 with SMTP id qw7mr46975831pbb.68.1400557934069; Mon, 19 May 2014 20:52:14 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id id10sm437284pbc.35.2014.05.19.20.52.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 May 2014 20:52:13 -0700 (PDT) From: Tushar Behera To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, tomasz.figa@gmail.com, Sachin Kamat Subject: [PATCH V2 1/2] ARM: EXYNOS: Update secondary boot addr for secure mode Date: Tue, 20 May 2014 09:20:09 +0530 Message-Id: <1400557810-28428-1-git-send-email-tushar.behera@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 From: Sachin Kamat 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 --- Changes for V2: * Changed the condition statement as per review comment * Fixed coding style 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 739bdc8..7d18103 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -50,8 +50,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()) - 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;