From patchwork Wed Dec 18 08:08:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 3368431 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 71B219F314 for ; Wed, 18 Dec 2013 08:11:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48B1D2041B for ; Wed, 18 Dec 2013 08:11:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B37D203FB for ; Wed, 18 Dec 2013 08:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752309Ab3LRIL0 (ORCPT ); Wed, 18 Dec 2013 03:11:26 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:61624 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258Ab3LRIL0 (ORCPT ); Wed, 18 Dec 2013 03:11:26 -0500 Received: by mail-pb0-f46.google.com with SMTP id md12so8098765pbc.19 for ; Wed, 18 Dec 2013 00:11:25 -0800 (PST) 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:in-reply-to :references; bh=lSNW+pM8ILTGDr0x6wq0q02B/uconRX74ctvHuYGlxY=; b=MdHPQ5RhHpvWTpg0Lke79dTvES7BiKUrNbYF8ODwRgGzs+NdM1SflGfRBNchTYtrpl FB+q1KW/MHbfrdMa9B/5CtHvIJYnOjVSvJXDd7v8M/mBK1EpOQa8UoUp6JQiQUghTUtB OkPHYItIb3b/0m5hgAQFbS7UUjBOxgcU4Wast9P68WXZnOWWq1m4Whlo8AFW72JXB6y1 Ztx/Aa36vr6VtadeMrkNdVdPluNbxqbGjuN8L8qYgcDYKSLgsbHMREgN22O1H/z8y8za QZvYFrX2JDJeU4ALRHYG1n9bTpFZiuZqwqlLraIO5IR/WknSf+biyDk4fum3I5mTfjA6 tz7w== X-Gm-Message-State: ALoCoQnJ68L8MWPe51seFQGqr+5Bdh4EVGk3cLPsylRPKMzenbhVX2dMGG2sFLd8sDEfHcnkW8q9 X-Received: by 10.68.88.161 with SMTP id bh1mr32505887pbb.49.1387354285785; Wed, 18 Dec 2013 00:11:25 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id lh13sm52950143pab.4.2013.12.18.00.11.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Dec 2013 00:11:25 -0800 (PST) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, t.figa@samsung.com, sachin.kamat@linaro.org, tushar.behera@linaro.org Subject: [PATCH 2/3] ARM: EXYNOS: Add secure firmware support for Exynos5420 Date: Wed, 18 Dec 2013 13:38:11 +0530 Message-Id: <1387354092-4084-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1387354092-4084-1-git-send-email-sachin.kamat@linaro.org> References: <1387354092-4084-1-git-send-email-sachin.kamat@linaro.org> 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.4 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 Secure firmware support for booting secondary CPUs on Exynos5420 based boards with trustzone support. Signed-off-by: Sachin Kamat Signed-off-by: Tushar Behera --- arch/arm/mach-exynos/firmware.c | 6 +++++- arch/arm/mach-exynos/mach-exynos5-dt.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 932129ef26c6..4711f29b331d 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -17,6 +17,7 @@ #include #include +#include #include "smc.h" @@ -34,7 +35,10 @@ static int exynos_cpu_boot(int cpu) 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_exynos5420()) + boot_reg += 4 * cpu; __raw_writel(boot_addr, boot_reg); return 0; diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 5bf767fec19d..4c071d50bf35 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -76,6 +76,7 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") /* Maintainer: Kukjin Kim */ .smp = smp_ops(exynos_smp_ops), .map_io = exynos_init_io, + .init_early = exynos_firmware_init, .init_machine = exynos5_dt_machine_init, .init_late = exynos_init_late, .dt_compat = exynos5_dt_compat,