diff options
author | Peng Du <pdu@nvidia.com> | 2014-06-11 13:45:03 -0700 |
---|---|---|
committer | Mandar Padmawar <mpadmawar@nvidia.com> | 2014-06-19 07:33:44 -0700 |
commit | 1c17dcad971192c67a9a7c3a687a58906c40e428 (patch) | |
tree | 4a957875667b705742ea990a1ff4864420497068 /arch/arm64 | |
parent | 97e11202ffb35663b68a3c8b21ec7a79e26b713a (diff) |
arm64: tegra132: enter C6 for hotplug
Bug 1522953
Change-Id: Icb7fff057326a72a243037d3d64b88f99ac4fe68
Signed-off-by: Peng Du <pdu@nvidia.com>
Reviewed-on: http://git-master/r/422795
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Chao Xu <cxu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/mach-tegra/hotplug-denver.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/arch/arm64/mach-tegra/hotplug-denver.c b/arch/arm64/mach-tegra/hotplug-denver.c index a04d494dc0c9..e0441b3762a2 100644 --- a/arch/arm64/mach-tegra/hotplug-denver.c +++ b/arch/arm64/mach-tegra/hotplug-denver.c @@ -33,6 +33,8 @@ extern volatile ulong secondary_holding_pen_release; +extern bool tegra_suspend_in_progress(void); + /* * platform-specific code to shutdown a CPU * @@ -40,11 +42,31 @@ extern volatile ulong secondary_holding_pen_release; */ void tegra_cpu_die(unsigned int cpu) { - /* Enter C7 for hotplug */ - tegra_tear_down_cpu(); + static unsigned long pmstate; + + if (tegra_suspend_in_progress()) { + BUG_ON(cpu == 0); + + /* CPU1 must be in C7 for LP0/LP1 */ + tegra_tear_down_cpu(); + + /* Synchronize with CPU0 */ + while (secondary_holding_pen_release != cpu) + cpu_relax(); + } + else { + do { + asm volatile ( + " msr actlr_el1, %0\n" + " wfi\n" + : : "r" (T132_CORE_C6)); + } while (secondary_holding_pen_release != cpu); + } - while (secondary_holding_pen_release != cpu) - cpu_relax(); +#ifdef CONFIG_TEGRA_NVDUMPER + /* set debug footprint */ + dbg_set_cpu_hotplug_on(cpu, 0xDEAD); +#endif } noinline void setup_mca(void *info) |