All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sachin Kamat <sachin.kamat@linaro.org>
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	[thread overview]
Message-ID: <1387354092-4084-2-git-send-email-sachin.kamat@linaro.org> (raw)
In-Reply-To: <1387354092-4084-1-git-send-email-sachin.kamat@linaro.org>

Secure firmware support for booting secondary CPUs on Exynos5420
based boards with trustzone support.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
 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 <asm/firmware.h>
 
 #include <mach/map.h>
+#include <plat/cpu.h>
 
 #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 <kgene.kim@samsung.com> */
 	.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,
-- 
1.7.9.5

  reply	other threads:[~2013-12-18  8:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  8:08 [PATCH 1/3] ARM: EXYNOS: Add IO mapping for non-secure SYSRAM Sachin Kamat
2013-12-18  8:08 ` Sachin Kamat [this message]
2013-12-18  8:08 ` [PATCH 3/3] ARM: dts: Add firmware node for secure boot on Arndale-octa Sachin Kamat
  -- strict thread matches above, loose matches on Subject: below --
2013-12-18  8:05 [PATCH 1/3] ARM: EXYNOS: Add IO mapping for non-secure SYSRAM Sachin Kamat
2013-12-18  8:05 ` [PATCH 2/3] ARM: EXYNOS: Add secure firmware support for Exynos5420 Sachin Kamat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1387354092-4084-2-git-send-email-sachin.kamat@linaro.org \
    --to=sachin.kamat@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=t.figa@samsung.com \
    --cc=tushar.behera@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.