summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/pbl_nmon.h
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2017-01-09 16:28:08 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2017-01-10 08:27:33 +0100
commit9563a024d28c0f35db8fc459931f4909bbffe5eb (patch)
treee462347e2ee836de50161ee0b1d38bd987ccb028 /arch/mips/include/asm/pbl_nmon.h
parentdeba980e994f1a72e94464a27e7cda45a7284c78 (diff)
downloadbarebox-9563a024d28c0f35db8fc459931f4909bbffe5eb.tar.gz
barebox-9563a024d28c0f35db8fc459931f4909bbffe5eb.tar.xz
MIPS: drop redundant debug_ll_outhexw macro defines
The debug_ll_outhexw macro has no dependency on UART model so we can remove it from UART-dependent header files (debug_ll_ns16550.h and mach-ath79/.../debug_ll.h). On the other hand the only debug_ll_outhexw user is MIPS nmon monitor so we can move the debug_ll_outhexw macro to pbl_nmon.h. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/include/asm/pbl_nmon.h')
-rw-r--r--arch/mips/include/asm/pbl_nmon.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/mips/include/asm/pbl_nmon.h b/arch/mips/include/asm/pbl_nmon.h
index 90e2da8ef9..e0326bd7cd 100644
--- a/arch/mips/include/asm/pbl_nmon.h
+++ b/arch/mips/include/asm/pbl_nmon.h
@@ -43,6 +43,37 @@
.set pop
.endm
+/*
+ * output a 32-bit value in hex
+ */
+.macro debug_ll_outhexw
+#ifdef CONFIG_DEBUG_LL
+ .set push
+ .set reorder
+
+ move t6, a0
+ li t5, 32
+
+202:
+ addi t5, t5, -4
+ srlv a0, t6, t5
+
+ /* output one hex digit */
+ andi a0, a0, 15
+ blt a0, 10, 203f
+
+ addi a0, a0, ('a' - '9' - 1)
+
+203:
+ addi a0, a0, '0'
+
+ debug_ll_outc_a0
+
+ bgtz t5, 202b
+
+ .set pop
+#endif /* CONFIG_DEBUG_LL */
+.endm
.macro mips_nmon
.set push