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

Oleksij Rempel linux at rempel-privat.de
Wed Jun 19 05:11:27 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..cfca117 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
+1:
+	bgtz	\reg, 1b
+	 addi	\reg, -1
+	.set	pop
+	.endm
+
 	/*
 	 * ADR macro instruction (inspired by ARM)
 	 *
-- 
1.8.1.2




More information about the barebox mailing list