From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] MIPS: drop redundant debug_ll_outhexw macro defines
Date: Tue, 10 Jan 2017 08:23:09 +0100 [thread overview]
Message-ID: <20170110072309.6byvxlzyvajoqdos@pengutronix.de> (raw)
In-Reply-To: <20170109132808.24043-1-antonynpavlov@gmail.com>
On Mon, Jan 09, 2017 at 04:28:08PM +0300, Antony Pavlov wrote:
> 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>
Applied, thanks
Sascha
> ---
> arch/mips/include/asm/debug_ll_ns16550.h | 32 ----------------------------
> arch/mips/include/asm/pbl_nmon.h | 31 +++++++++++++++++++++++++++
> arch/mips/mach-ath79/include/mach/debug_ll.h | 32 ----------------------------
> 3 files changed, 31 insertions(+), 64 deletions(-)
>
> diff --git a/arch/mips/include/asm/debug_ll_ns16550.h b/arch/mips/include/asm/debug_ll_ns16550.h
> index 4a6562f7c..058814ecf 100644
> --- a/arch/mips/include/asm/debug_ll_ns16550.h
> +++ b/arch/mips/include/asm/debug_ll_ns16550.h
> @@ -128,38 +128,6 @@ static inline void PUTC_LL(char ch)
> .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
> -
> -/*
> * check character in input buffer
> * return value:
> * v0 = 0 no character in input buffer
> diff --git a/arch/mips/include/asm/pbl_nmon.h b/arch/mips/include/asm/pbl_nmon.h
> index 90e2da8ef..e0326bd7c 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
> diff --git a/arch/mips/mach-ath79/include/mach/debug_ll.h b/arch/mips/mach-ath79/include/mach/debug_ll.h
> index e0c3f797b..04bd3ea72 100644
> --- a/arch/mips/mach-ath79/include/mach/debug_ll.h
> +++ b/arch/mips/mach-ath79/include/mach/debug_ll.h
> @@ -123,38 +123,6 @@ static inline void PUTC_LL(int ch)
> .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
> -
> -/*
> * check character in input buffer
> * return value:
> * v0 = 0 no character in input buffer
> --
> 2.11.0
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2017-01-10 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 13:28 Antony Pavlov
2017-01-10 7:23 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170110072309.6byvxlzyvajoqdos@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox