summaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-11-06 16:10:37 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-06 16:10:37 +0100
commit736a74ba7a1c3983105b92a709c263e206fe3913 (patch)
treec7b3a557a522c77b8dae579b631c67df87527031 /arch/mips/include
parent3cdd30342bb31fae72adf52903cce2876cdead9d (diff)
parente856be53614e5ded1f5c948735e8cc53db23f8a8 (diff)
downloadbarebox-736a74ba7a1c3983105b92a709c263e206fe3913.tar.gz
barebox-736a74ba7a1c3983105b92a709c263e206fe3913.tar.xz
Merge branch 'for-next/mips'
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/pbl_macros.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h
index 1d9d6ab7ef..681b40a305 100644
--- a/arch/mips/include/asm/pbl_macros.h
+++ b/arch/mips/include/asm/pbl_macros.h
@@ -28,6 +28,38 @@
#include <generated/compile.h>
#include <generated/utsrelease.h>
+ .macro pbl_reg_writel val addr
+ .set push
+ .set noreorder
+ li t9, \addr
+ li t8, \val
+ sw t8, 0(t9)
+ .set pop
+ .endm
+
+ .macro pbl_reg_set val addr
+ .set push
+ .set noreorder
+ li t9, \addr
+ li t8, \val
+ lw t7, 0(t9)
+ or t7, t8
+ sw t7, 0(t9)
+ .set pop
+ .endm
+
+ .macro pbl_reg_clr clr addr
+ .set push
+ .set noreorder
+ li t9, \addr
+ li t8, \clr
+ lw t7, 0(t9)
+ not t8, t8
+ and t7, t8
+ sw t7, 0(t9)
+ .set pop
+ .endm
+
.macro pbl_sleep reg count
.set push
.set noreorder