secureos: Remove useless smc for t114
Hyung Taek Ryoo [Fri, 7 Dec 2012 00:05:05 +0000 (16:05 -0800)]
This change removes obsolete smc which causes abort when resuming
in secure os build.
Same smc function called twice at boot time by function tegra_resume,
1st in virtual context, 2nd in physical, cache clean during exec of 2nd call.
In consequence, if remove this obsolete call, the abort issue is fixed.

Change-Id: I34254358cd9d79b84560711f0beac487f03a59ab
Signed-off-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-on: http://git-master/r/169227
(cherry picked from commit 98ca470997f9ddb1cd15e99ed3d453d7036988ca)
Reviewed-on: http://git-master/r/171333
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/mach-tegra/headsmp.S
arch/arm/mach-tegra/pm.c
arch/arm/mach-tegra/sleep.h

index 3ec9b6a..b9e2105 100644 (file)
@@ -114,6 +114,7 @@ ENTRY(tegra_resume)
 #endif
 
 #ifdef CONFIG_TRUSTED_FOUNDATIONS
+#ifndef CONFIG_ARCH_TEGRA_11x_SOC
        mov32   r1, TEGRA_TMRUS_BASE
        ldr     r0, [r1]
        adr     r1, tegra_resume_smc_entry_time
@@ -127,21 +128,25 @@ ENTRY(tegra_resume)
        adr     r1, tegra_resume_smc_exit_time
        str     r0, [r1]
 #endif
-
+#endif
        b       cpu_resume
 ENDPROC(tegra_resume)
 
 #ifdef CONFIG_TRUSTED_FOUNDATIONS
        .globl tegra_resume_timestamps_start
+#ifndef CONFIG_ARCH_TEGRA_11x_SOC
        .globl tegra_resume_smc_entry_time
        .globl tegra_resume_smc_exit_time
+#endif
        .globl tegra_resume_entry_time
        .globl tegra_resume_timestamps_end
 tegra_resume_timestamps_start:
+#ifndef CONFIG_ARCH_TEGRA_11x_SOC
 tegra_resume_smc_entry_time:
        .long   0
 tegra_resume_smc_exit_time:
        .long   0
+#endif
 tegra_resume_entry_time:
        .long   0
 tegra_resume_timestamps_end:
index 0e2b712..9876d56 100644 (file)
@@ -690,9 +690,11 @@ unsigned int tegra_idle_power_down_last(unsigned int sleep_time,
        tegra_init_cache(false);
 
 #ifdef CONFIG_TRUSTED_FOUNDATIONS
+#ifndef CONFIG_ARCH_TEGRA_11x_SOC
        trace_smc_wake(tegra_resume_smc_entry_time, NVSEC_SMC_START);
        trace_smc_wake(tegra_resume_smc_exit_time, NVSEC_SMC_DONE);
 #endif
+#endif
 
        tegra_cluster_switch_time(flags, tegra_cluster_switch_time_id_switch);
        restore_cpu_complex(flags);
@@ -1002,8 +1004,10 @@ int tegra_suspend_dram(enum tegra_suspend_mode mode, unsigned int flags)
        tegra_init_cache(true);
 
 #ifdef CONFIG_TRUSTED_FOUNDATIONS
+#ifndef CONFIG_ARCH_TEGRA_11x_SOC
        trace_smc_wake(tegra_resume_smc_entry_time, NVSEC_SMC_START);
        trace_smc_wake(tegra_resume_smc_exit_time, NVSEC_SMC_DONE);
+#endif
 
        if (mode == TEGRA_SUSPEND_LP0) {
                trace_secureos_init(tegra_resume_entry_time,
index b144b10..32f7126 100644 (file)
@@ -217,8 +217,10 @@ void tegra3_hotplug_shutdown(void);
 #ifdef CONFIG_TRUSTED_FOUNDATIONS
 extern unsigned long tegra_resume_timestamps_start;
 extern unsigned long tegra_resume_timestamps_end;
+#ifndef CONFIG_ARCH_TEGRA_11x_SOC
 extern unsigned long tegra_resume_smc_entry_time;
 extern unsigned long tegra_resume_smc_exit_time;
+#endif
 extern unsigned long tegra_resume_entry_time;
 #endif