Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303410
b: refs/heads/master
c: 89326f7
h: refs/heads/master
v: v3
  • Loading branch information
Chao Xie authored and Haojian Zhuang committed May 7, 2012
1 parent 8d974e7 commit b29df69
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f5d081957cee794fe2937bb7edafa7ac949044d
refs/heads/master: 89326f76b7ae602eb6a2d3e4cc028190fc8d480f
24 changes: 24 additions & 0 deletions trunk/arch/arm/mm/cache-tauros2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit b29df69

Please sign in to comment.