diff options
author | Scott Williams <scwilliams@nvidia.com> | 2011-07-19 15:13:40 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:49 -0800 |
commit | 08b30e31304a0fd8635631e692eaff5ce621c51e (patch) | |
tree | a042367deebf8f6dd0877766954b89de3e6e4c69 /arch/arm/mach-tegra | |
parent | 622671c583cdfd5b5c82fc0329d5ee2cd487d83e (diff) |
ARM: tegra2: Don't use tegra_cpu_save to exit coherency on reset
Change tegra2_sleep_reset not to depend on tegra_cpu_save to exit
coherency.
Now tegra2_sleep_reset no longer depends on CONFIG_PM_SLEEP
Change-Id: I478e723e826fd3ddbd6a6e8bceaedf795bd2ee26
Signed-off-by: Scott Williams <scwilliams@nvidia.com>
DW: Split into logical changes
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Rebase-Id: R2138dcf60971f7a9ad78e6a39fc2206c99faf7b5
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/hotplug.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-tegra/sleep-t2.S | 19 |
2 files changed, 23 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index cde2659451ae..88c664f7dfad 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c @@ -1,7 +1,7 @@ /* - * linux/arch/arm/mach-tegra/hotplug.c + * arch/arm/mach-tegra/hotplug.c * - * Copyright (C) 2010 NVIDIA Corporation + * Copyright (C) 2010-2011 NVIDIA Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -12,6 +12,7 @@ #include <linux/smp.h> #include <asm/cpu_pm.h> +#include <asm/cacheflush.h> #include <mach/iomap.h> @@ -51,7 +52,11 @@ int platform_cpu_kill(unsigned int cpu) void platform_cpu_die(unsigned int cpu) { + /* Flush the L1 data cache. */ + flush_cache_all(); + #ifdef CONFIG_ARCH_TEGRA_2x_SOC + /* Place the current CPU in reset. */ tegra2_sleep_reset(); #endif diff --git a/arch/arm/mach-tegra/sleep-t2.S b/arch/arm/mach-tegra/sleep-t2.S index df88d81d2ee4..0eb51210822a 100644 --- a/arch/arm/mach-tegra/sleep-t2.S +++ b/arch/arm/mach-tegra/sleep-t2.S @@ -70,15 +70,28 @@ #define TEGRA_CLK_RESET_VIRT (TEGRA_CLK_RESET_BASE - IO_PPSB_PHYS + IO_PPSB_VIRT) /* - * tegra2_sleep_reset(unsigned long v2p) + * tegra2_sleep_reset(void) * * puts the current cpu in reset - * uses tegra_cpu_save to take the cpu out of coherence * should never return */ ENTRY(tegra2_sleep_reset) - bl tegra_cpu_save cpu_id r0 + + /* Exit coherency. */ + mrc p15, 0, r3, c1, c0, 1 @ ACTLR + bic r3, r3, #(1<<6) @ exit coherency SCTLR.SMP + mcr p15, 0, r3, c1, c0, 1 @ ACTLR + isb + + /* Invalidate the SCU tags for this CPU. */ + mov32 r3, TEGRA_ARM_PERIF_VIRT + 0xC @ SCUIAR + mov r2, r0, lsl #2 + mov r1, #0xf + mov r1, r1, lsl r2 @ 0xF << (cpu * 4) + str r1, [r3] @ invalidate SCU tags for CPU + + /* Put this CPU into reset. */ bl tegra2_cpu_reset mov pc, lr ENDPROC(tegra2_sleep_reset) |