diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 10:58:20 -0800 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 10:58:20 -0800 | 
| commit | a11da7df6543b5f71a150b47c0d08ecf0799a0f3 (patch) | |
| tree | 77eaac99426f64a0a8dc3b5d62c86138a8c72d43 /arch/arm/mach-exynos/hotplug.c | |
| parent | b8edf848e9119bab9d999b9ca80d8520641810f2 (diff) | |
| parent | 9c7466b217af784280d9fc841bbd559ef3bf33e9 (diff) | |
| download | olio-linux-3.10-a11da7df6543b5f71a150b47c0d08ecf0799a0f3.tar.xz olio-linux-3.10-a11da7df6543b5f71a150b47c0d08ecf0799a0f3.zip  | |
Merge tag 'pm-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC power management and clock changes from Olof Johansson:
 "This branch contains a largeish set of updates of power management and
  clock setup.  The bulk of it is for OMAP/AM33xx platforms, but also a
  few around hotplug/suspend/resume on Exynos.
  It includes a split-up of some of the OMAP clock data into separate
  files which adds to the diffstat, but gross delta is fairly reasonable."
* tag 'pm-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits)
  ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h
  ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support
  watchdog: OMAP: fixup for ARM multiplatform support
  ARM: EXYNOS: Add flush_cache_all in suspend finisher
  ARM: EXYNOS: Remove scu_enable from cpuidle
  ARM: EXYNOS: Fix soft reboot hang after suspend/resume
  ARM: EXYNOS: Add support for rtc wakeup
  ARM: EXYNOS: fix the hotplug for Cortex-A15
  ARM: OMAP2+: omap_device: Correct resource handling for DT boot
  ARM: OMAP2+: hwmod: Add possibility to count hwmod resources based on type
  ARM: OMAP2+: hwmod: Add support for per hwmod/module context lost count
  ARM: OMAP2+: PRM: initialize some PRM functions early
  ARM: OMAP2+: voltage: fixup oscillator handling when CONFIG_PM=n
  ARM: OMAP4: USB: power down MUSB PHY during boot
  ARM: OMAP2+: clock: Cleanup !CONFIG_COMMON_CLK parts
  ARM: OMAP2xxx: clock: drop obsolete clock data
  ARM: OMAP2: clock: Cleanup !CONFIG_COMMON_CLK parts
  ARM: OMAP3+: DPLL: drop !CONFIG_COMMON_CLK sections
  ARM: AM33xx: clock: drop obsolete clock data
  ARM: OMAP3xxx: clk: drop obsolete clock data
  ...
Diffstat (limited to 'arch/arm/mach-exynos/hotplug.c')
| -rw-r--r-- | arch/arm/mach-exynos/hotplug.c | 45 | 
1 files changed, 42 insertions, 3 deletions
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index f4d7dd20cda..c3f825b2794 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c @@ -20,10 +20,11 @@  #include <asm/smp_plat.h>  #include <mach/regs-pmu.h> +#include <plat/cpu.h>  #include "common.h" -static inline void cpu_enter_lowpower(void) +static inline void cpu_enter_lowpower_a9(void)  {  	unsigned int v; @@ -45,6 +46,35 @@ static inline void cpu_enter_lowpower(void)  	  : "cc");  } +static inline void cpu_enter_lowpower_a15(void) +{ +	unsigned int v; + +	asm volatile( +	"	mrc	p15, 0, %0, c1, c0, 0\n" +	"	bic	%0, %0, %1\n" +	"	mcr	p15, 0, %0, c1, c0, 0\n" +	  : "=&r" (v) +	  : "Ir" (CR_C) +	  : "cc"); + +	flush_cache_louis(); + +	asm volatile( +	/* +	* Turn off coherency +	*/ +	"	mrc	p15, 0, %0, c1, c0, 1\n" +	"	bic	%0, %0, %1\n" +	"	mcr	p15, 0, %0, c1, c0, 1\n" +	: "=&r" (v) +	: "Ir" (0x40) +	: "cc"); + +	isb(); +	dsb(); +} +  static inline void cpu_leave_lowpower(void)  {  	unsigned int v; @@ -103,11 +133,20 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)  void __ref exynos_cpu_die(unsigned int cpu)  {  	int spurious = 0; +	int primary_part = 0;  	/* -	 * we're ready for shutdown now, so do it +	 * we're ready for shutdown now, so do it. +	 * Exynos4 is A9 based while Exynos5 is A15; check the CPU part +	 * number by reading the Main ID register and then perform the +	 * appropriate sequence for entering low power.  	 */ -	cpu_enter_lowpower(); +	asm("mrc p15, 0, %0, c0, c0, 0" : "=r"(primary_part) : : "cc"); +	if ((primary_part & 0xfff0) == 0xc0f0) +		cpu_enter_lowpower_a15(); +	else +		cpu_enter_lowpower_a9(); +  	platform_do_lowpower(cpu, &spurious);  	/*  |