diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2015-05-04 15:29:22 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-05-05 13:41:40 +0200 |
commit | 9035f20098082c81134d362beef4a1279227ccd2 (patch) | |
tree | 532d4af067238113a2e203d68e33c36d2c09a95f /arch/mips/include | |
parent | 660d4ef13e798d25e6d667b8cf72fe9520198e5c (diff) | |
download | barebox-9035f20098082c81134d362beef4a1279227ccd2.tar.gz barebox-9035f20098082c81134d362beef4a1279227ccd2.tar.xz |
MIPS: debug_ll_ns16550.h: drop _ns16550 suffix
This commit makes it possible to have unified debug_ll_*
assembler routines for differrent UART program model.
E.g. we can use debug_ll_putc() routine in common
code without knowledge on exact UART model: ns16550
or ar933x.
Also rename *_check_char -> *_tstc.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/debug_ll_ns16550.h | 20 | ||||
-rw-r--r-- | arch/mips/include/asm/pbl_nmon.h | 21 |
2 files changed, 20 insertions, 21 deletions
diff --git a/arch/mips/include/asm/debug_ll_ns16550.h b/arch/mips/include/asm/debug_ll_ns16550.h index 032f0a2869..a3e1c52f63 100644 --- a/arch/mips/include/asm/debug_ll_ns16550.h +++ b/arch/mips/include/asm/debug_ll_ns16550.h @@ -90,7 +90,7 @@ static __inline__ void PUTC_LL(char ch) /* * output a character in a0 */ -.macro debug_ll_ns16550_outc_a0 +.macro debug_ll_outc_a0 #ifdef CONFIG_DEBUG_LL .set push .set reorder @@ -110,10 +110,10 @@ static __inline__ void PUTC_LL(char ch) /* * output a character */ -.macro debug_ll_ns16550_outc chr +.macro debug_ll_outc chr #ifdef CONFIG_DEBUG_LL li a0, \chr - debug_ll_ns16550_outc_a0 + debug_ll_outc_a0 #endif /* CONFIG_DEBUG_LL */ .endm @@ -122,15 +122,15 @@ static __inline__ void PUTC_LL(char ch) */ .macro debug_ll_ns16550_outnl #ifdef CONFIG_DEBUG_LL - debug_ll_ns16550_outc '\r' - debug_ll_ns16550_outc '\n' + debug_ll_outc '\r' + debug_ll_outc '\n' #endif /* CONFIG_DEBUG_LL */ .endm /* * output a 32-bit value in hex */ -.macro debug_ll_ns16550_outhexw +.macro debug_ll_outhexw #ifdef CONFIG_DEBUG_LL .set push .set reorder @@ -151,7 +151,7 @@ static __inline__ void PUTC_LL(char ch) 203: addi a0, a0, '0' - debug_ll_ns16550_outc_a0 + debug_ll_outc_a0 bgtz t5, 202b @@ -165,7 +165,7 @@ static __inline__ void PUTC_LL(char ch) * v0 = 0 no character in input buffer * v0 != 0 character in input buffer */ -.macro debug_ll_ns16550_check_char +.macro debug_ll_tstc #ifdef CONFIG_DEBUG_LL .set push .set reorder @@ -183,13 +183,13 @@ static __inline__ void PUTC_LL(char ch) /* * get character to v0 */ -.macro debug_ll_ns16550_getc +.macro debug_ll_getc #ifdef CONFIG_DEBUG_LL .set push .set reorder 204: - debug_ll_ns16550_check_char + debug_ll_tstc /* try again */ beqz v0, 204b diff --git a/arch/mips/include/asm/pbl_nmon.h b/arch/mips/include/asm/pbl_nmon.h index e7baa4c5a9..90e2da8ef9 100644 --- a/arch/mips/include/asm/pbl_nmon.h +++ b/arch/mips/include/asm/pbl_nmon.h @@ -17,8 +17,7 @@ * */ -#include <board/debug_ll.h> -#include <asm/debug_ll_ns16550.h> +#include <mach/debug_ll.h> #define CODE_ESC 0x1b @@ -74,7 +73,7 @@ nmon_wait_user: nmon_outs msg_bsp - debug_ll_ns16550_check_char + debug_ll_tstc bnez v0, 3f @@ -91,7 +90,7 @@ msg_nmon_press_any_key: .align 4 3: /* get received char from ns16550's buffer */ - debug_ll_ns16550_getc + debug_ll_getc #endif /* CONFIG_NMON_USER_START */ nmon_main_help: @@ -102,9 +101,9 @@ nmon_main_help: nmon_main: nmon_outs msg_prompt - debug_ll_ns16550_getc + debug_ll_getc - /* prepare a0 for debug_ll_ns16550_outc_a0 */ + /* prepare a0 for debug_ll_outc_a0 */ move a0, v0 li v1, 'q' @@ -137,7 +136,7 @@ nmon_cmd_d: nmon_outs msg_nl lw a0, (v0) - debug_ll_ns16550_outhexw + debug_ll_outhexw b nmon_main @@ -170,7 +169,7 @@ nmon_cmd_g: b nmon_main _nmon_outc_a0: - debug_ll_ns16550_outc_a0 + debug_ll_outc_a0 jr ra _nmon_outs: @@ -178,7 +177,7 @@ _nmon_outs: addi a1, a1, 1 beqz a0, _nmon_jr_ra_exit - debug_ll_ns16550_outc_a0 + debug_ll_outc_a0 b _nmon_outs @@ -188,7 +187,7 @@ _nmon_gethexw: li t2, 0 _get_hex_digit: - debug_ll_ns16550_getc + debug_ll_getc li v1, CODE_ESC beq v0, v1, nmon_main @@ -221,7 +220,7 @@ _get_hex_digit: sub a3, v0, a3 0: move a0, v0 - debug_ll_ns16550_outc_a0 + debug_ll_outc_a0 sll t2, t2, 4 or t2, t2, a3 |