[PATCH 2/8 v2] MIPS: pbl: add pbl_sleep macro

Oleksij Rempel linux at rempel-privat.de
Fri Jun 21 02:44:56 EDT 2013


Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 arch/mips/include/asm/pbl_macros.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h
index a3f970c..fde9434 100644
--- a/arch/mips/include/asm/pbl_macros.h
+++ b/arch/mips/include/asm/pbl_macros.h
@@ -28,6 +28,16 @@
 #include <generated/compile.h>
 #include <generated/utsrelease.h>
 
+	.macro	pbl_sleep reg count
+	.set push
+	.set noreorder
+	li	\reg, \count
+254:
+	bgtz	\reg, 254b
+	 addi	\reg, -1
+	.set	pop
+	.endm
+
 	/*
 	 * ADR macro instruction (inspired by ARM)
 	 *
-- 
1.8.1.2




More information about the barebox mailing list