diff options
author | Nitin Sehgal <nsehgal@nvidia.com> | 2014-02-06 12:22:45 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2014-02-09 21:54:20 -0800 |
commit | 7f93a0dddf39f372c064f772f9af6903e91aaacf (patch) | |
tree | 771484fe44d5857a58ca2b20c3dde9820584737e /arch/arm/mach-tegra/cpuidle-t11x.c | |
parent | 76fdf095ea7881e7f62621d6c6baabc4e50e660f (diff) |
ARM: tegra: trustzone: Single kernel to work in both secure and non-secure mode.
- Remove CONFIG_TEGRA_USE_SECURE_KERNEL config option
- Use DBGDSCR.NS bit to dynamically get secure/non-secure mode
- Replace ifdefs with dynamic code.
- Keep CONFIG_TRUSTED_LITTLE_KERNEL to enable secure os
bug 1411345
Change-Id: I75ddfed7a35fcb30e2772bb43057ae022bcf09b3
Signed-off-by: Nitin Sehgal <nsehgal@nvidia.com>
Reviewed-on: http://git-master/r/353155
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/cpuidle-t11x.c')
-rw-r--r-- | arch/arm/mach-tegra/cpuidle-t11x.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-t11x.c b/arch/arm/mach-tegra/cpuidle-t11x.c index 360635909dea..f0166c9ac95b 100644 --- a/arch/arm/mach-tegra/cpuidle-t11x.c +++ b/arch/arm/mach-tegra/cpuidle-t11x.c @@ -456,13 +456,13 @@ static bool tegra_cpu_core_power_down(struct cpuidle_device *dev, tegra_cpu_wake_by_time[dev->cpu] = ktime_to_us(entry_time) + request; smp_wmb(); -#ifdef CONFIG_TEGRA_USE_SECURE_KERNEL - if ((cpu == 0) || (cpu == 4)) { - tegra_generic_smc(0x84000001, ((1 << 16) | 5), + if (!is_secure_mode()) + if ((cpu == 0) || (cpu == 4)) { + tegra_generic_smc(0x84000001, ((1 << 16) | 5), (TEGRA_RESET_HANDLER_BASE + tegra_cpu_reset_handler_offset)); - } -#endif + } + cpu_suspend(0, tegra3_sleep_cpu_secondary_finish); tegra11x_restore_vmin(); |