From patchwork Wed Dec 18 08:05:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 3368421 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 45684C0D4B for ; Wed, 18 Dec 2013 08:08:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C053203FB for ; Wed, 18 Dec 2013 08:08:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22AD9203E5 for ; Wed, 18 Dec 2013 08:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751662Ab3LRIIw (ORCPT ); Wed, 18 Dec 2013 03:08:52 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:63601 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905Ab3LRIIw (ORCPT ); Wed, 18 Dec 2013 03:08:52 -0500 Received: by mail-pd0-f175.google.com with SMTP id w10so7914553pde.20 for ; Wed, 18 Dec 2013 00:08:51 -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=C5p31Twn5eLtAdbJq2rzbkwjub0SGdV8RDyy+xioYD/Nn0vrPktngj7ab04Cqou0iT /lgLaUotaAW/o4YWmhUNpGOETIamOh3TDlqz2AploUBaJRTCch+RvB5OTW/VDc0Xx+8O vlqObfQ3etyVBZsxV3O07L+NV2sxCr5hsNOQti37R5EMfha7t3KEewdPfNqeLDufJPa8 aoHSiG9c0RwBXbmIUvHZnVwPgWvFjgUAHCVFjml8q8SfsMqrJaejqH9VbCcw0Ex/nDVD IjjLOUzJa80yWYyMIc5pt4dnKWjbMco6kqcrqTG1DHAYGE6rvC2wwLZpa8BZKibMHEOb Tedg== X-Gm-Message-State: ALoCoQl0cOLFKJQ432EOVvxAKkM1WKDHapax5GqH+i+8gfe8j768blk2D/9nzMugKTfmQb8ffVRA X-Received: by 10.66.154.197 with SMTP id vq5mr18785909pab.155.1387354131641; Wed, 18 Dec 2013 00:08:51 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id i10sm52953009pat.11.2013.12.18.00.08.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Dec 2013 00:08:50 -0800 (PST) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.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:35:34 +0530 Message-Id: <1387353935-1335-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1387353935-1335-1-git-send-email-sachin.kamat@linaro.org> References: <1387353935-1335-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,