diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-05-14 21:37:51 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-05-14 21:37:51 +0200 |
commit | 602b9ba2cb0c62595fa94650f9826ee37f6c633c (patch) | |
tree | aa7dce9b8b603177daf93cd58e28a6e34acfe26f /arch/arm/mm/cache-tauros2.c | |
parent | 853b20396becfe9425f4d5da74e10ea67811b188 (diff) | |
parent | 902ca2297180fe97f840427c114cc6dc7e77375e (diff) |
Merge branch 'power' of git://github.com/hzhuang1/linux into next/pm
* 'power' of git://github.com/hzhuang1/linux:
ARM: mmp: add pm support for pxa910
ARM: mmp: ttc_dkb: add PMIC support
ARM: cache: tauros2: add disable and resume callback
ARM: mm: proc-mohawk: add suspend resume for mohawk
ARM: mmp: add PM support for mmp2
ARM: mmp: move XX_REG definition to addr-map.h
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mm/cache-tauros2.c')
-rw-r--r-- | arch/arm/mm/cache-tauros2.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mm/cache-tauros2.c b/arch/arm/mm/cache-tauros2.c index 1fbca05fe90..23a7643e9a8 100644 --- a/arch/arm/mm/cache-tauros2.c +++ b/arch/arm/mm/cache-tauros2.c @@ -108,6 +108,26 @@ static void tauros2_flush_range(unsigned long start, unsigned long end) dsb(); } + +static void tauros2_disable(void) +{ + __asm__ __volatile__ ( + "mcr p15, 1, %0, c7, c11, 0 @L2 Cache Clean All\n\t" + "mrc p15, 0, %0, c1, c0, 0\n\t" + "bic %0, %0, #(1 << 26)\n\t" + "mcr p15, 0, %0, c1, c0, 0 @Disable L2 Cache\n\t" + : : "r" (0x0)); +} + +static void tauros2_resume(void) +{ + __asm__ __volatile__ ( + "mcr p15, 1, %0, c7, c7, 0 @L2 Cache Invalidate All\n\t" + "mrc p15, 0, %0, c1, c0, 0\n\t" + "orr %0, %0, #(1 << 26)\n\t" + "mcr p15, 0, %0, c1, c0, 0 @Enable L2 Cache\n\t" + : : "r" (0x0)); +} #endif static inline u32 __init read_extra_features(void) @@ -194,6 +214,8 @@ void __init tauros2_init(void) outer_cache.inv_range = tauros2_inv_range; outer_cache.clean_range = tauros2_clean_range; outer_cache.flush_range = tauros2_flush_range; + outer_cache.disable = tauros2_disable; + outer_cache.resume = tauros2_resume; } #endif @@ -219,6 +241,8 @@ void __init tauros2_init(void) outer_cache.inv_range = tauros2_inv_range; outer_cache.clean_range = tauros2_clean_range; outer_cache.flush_range = tauros2_flush_range; + outer_cache.disable = tauros2_disable; + outer_cache.resume = tauros2_resume; } #endif |