summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/sleep.h
diff options
context:
space:
mode:
authorChris Johnson <cwj@nvidia.com>2011-11-18 16:14:07 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-08 17:59:13 +0530
commit644d1fbf85ef31720cfefbe1f332767fe572e93a (patch)
treee79dae0187c03fef575bee42306e63ced5d668d7 /arch/arm/mach-tegra/sleep.h
parentd4808f8257f2868ac5dc29da2a266e975156c583 (diff)
arm: tegra: add Trusted Foundations hooks and driver
Add CONFIG_TRUSTED_FOUNDATIONS build option and calls to issue SMCs to the TL secure monitor (used when needing to update state not writable by non-secure code). Make security/tf_driver an optional part of the build, which is part of the TL framework to interact with secure services. Bug 883391 Change-Id: I9c6c14ff457fb3a0c612d558fe731a17c2480750 Signed-off-by: Chris Johnson <cwj@nvidia.com> Reviewed-on: http://git-master/r/65616 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/sleep.h')
-rw-r--r--arch/arm/mach-tegra/sleep.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index cd982d3bb665..7b8f84d61699 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -30,12 +30,13 @@
#else
#define USE_TEGRA_CPU_SUSPEND 0
#endif
-
-#define TEGRA_PL310_VIRT (TEGRA_ARM_PL310_BASE - IO_CPU_PHYS + IO_CPU_VIRT)
-
-/* FIXME: The core associated with this should be removed if our change to
+#ifndef CONFIG_TRUSTED_FOUNDATIONS
+/* FIXME: The code associated with this should be removed if our change to
save the diagnostic regsiter in the CPU context is accepted. */
#define USE_TEGRA_DIAG_REG_SAVE 1
+#else
+#define USE_TEGRA_DIAG_REG_SAVE 0
+#endif
#define TEGRA_POWER_SDRAM_SELFREFRESH (1 << 26) /* SDRAM is in self-refresh */
#define TEGRA_POWER_HOTPLUG_SHUTDOWN (1 << 27) /* Hotplug shutdown */
@@ -85,6 +86,7 @@
#define FLOW_CTRL_CSR_WFI_BITMAP (0xF << 8)
#endif
+#define TEGRA_PL310_VIRT (TEGRA_ARM_PL310_BASE - IO_CPU_PHYS + IO_CPU_VIRT)
#define TEGRA_FLOW_CTRL_VIRT (TEGRA_FLOW_CTRL_BASE - IO_PPSB_PHYS + IO_PPSB_VIRT)
#define TEGRA_ARM_PERIF_VIRT (TEGRA_ARM_PERIF_BASE - IO_CPU_PHYS + IO_CPU_VIRT)
@@ -180,7 +182,7 @@
pop_stack_token \tmp1, \tmp2 @ debug stack debug token
.endm
-#else
+#else /* !defined(__ASSEMBLY__) */
#define FLOW_CTRL_HALT_CPU(cpu) (IO_ADDRESS(TEGRA_FLOW_CTRL_BASE) + \
((cpu) ? (FLOW_CTRL_HALT_CPU1_EVENTS + 8 * ((cpu) - 1)) : \
@@ -202,6 +204,8 @@ static inline void flowctrl_writel(unsigned long val, void __iomem *addr)
void tegra_pen_lock(void);
void tegra_pen_unlock(void);
void tegra_cpu_wfi(void);
+void tegra_sleep_cpu_save(unsigned long v2p);
+void tegra_resume(void);
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
extern void tegra2_iram_start;
@@ -238,19 +242,5 @@ static inline void *tegra_iram_end(void)
return &tegra3_iram_end;
#endif
}
-
-static inline void tegra_sleep_core(unsigned long v2p)
-{
-#ifdef CONFIG_ARCH_TEGRA_2x_SOC
- tegra2_sleep_core(v2p);
-#else
- tegra3_sleep_core(v2p);
-#endif
-}
-
-void tegra_sleep_cpu(unsigned long v2p);
-void tegra_resume(void);
-
#endif
-
#endif