From a3821b86118d547f8546b02265f9b0a88d33a03b Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Mon, 18 Sep 2006 23:20:55 +0100 Subject: [PATCH] --- yaml --- r: 36589 b: refs/heads/master c: 0b29de4a6ac0936f56b974a3c19bd9c24ac5b5d7 h: refs/heads/master i: 36587: 04baa2ed417aff7d2a8835be9d79ad86a833fa54 v: v3 --- [refs] | 2 +- trunk/include/asm-arm/hardware/iop3xx.h | 28 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5152e36f44f0..8e53ab5527a7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 863753a81e4f863015be34900dc2ba3637622f34 +refs/heads/master: 0b29de4a6ac0936f56b974a3c19bd9c24ac5b5d7 diff --git a/trunk/include/asm-arm/hardware/iop3xx.h b/trunk/include/asm-arm/hardware/iop3xx.h index b21ea41b149e..98b7cbc405e6 100644 --- a/trunk/include/asm-arm/hardware/iop3xx.h +++ b/trunk/include/asm-arm/hardware/iop3xx.h @@ -132,6 +132,34 @@ unsigned long iop3xx_gettimeoffset(void); extern struct platform_device iop3xx_i2c0_device; extern struct platform_device iop3xx_i2c1_device; + +extern inline void iop3xx_cp6_enable(void) +{ + u32 temp; + + asm volatile ( + "mrc p15, 0, %0, c15, c1, 0\n\t" + "orr %0, %0, #(1 << 6)\n\t" + "mcr p15, 0, %0, c15, c1, 0\n\t" + "mrc p15, 0, %0, c15, c1, 0\n\t" + "mov %0, %0\n\t" + "sub pc, pc, #4\n\t" + : "=r" (temp) ); +} + +extern inline void iop3xx_cp6_disable(void) +{ + u32 temp; + + asm volatile ( + "mrc p15, 0, %0, c15, c1, 0\n\t" + "bic %0, %0, #(1 << 6)\n\t" + "mcr p15, 0, %0, c15, c1, 0\n\t" + "mrc p15, 0, %0, c15, c1, 0\n\t" + "mov %0, %0\n\t" + "sub pc, pc, #4\n\t" + : "=r" (temp) ); +} #endif