From: Du Huanpeng <u74147@gmail.com>
To: barebox@lists.infradead.org
Cc: Du Huanpeng <u74147@gmail.com>
Subject: [PATCH] MIPS: asm/debug_ll_ns16550.h: add nop in delay slot
Date: Tue, 8 Sep 2020 14:25:05 +0800 [thread overview]
Message-ID: <1599546305-10121-1-git-send-email-u74147@gmail.com> (raw)
In the debug_ll_outc_a0 macro, a0 is written to the uart data
register many times in a delay slot when the uart is not ready
to send data. insert a nop to avoid this.
Signed-off-by: Du Huanpeng <u74147@gmail.com>
---
arch/mips/include/asm/debug_ll_ns16550.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/include/asm/debug_ll_ns16550.h b/arch/mips/include/asm/debug_ll_ns16550.h
index df58c4c..cf666d1 100644
--- a/arch/mips/include/asm/debug_ll_ns16550.h
+++ b/arch/mips/include/asm/debug_ll_ns16550.h
@@ -88,6 +88,7 @@ static inline void PUTC_LL(char ch)
201: lbu t1, UART_LSR(t0) /* get line status */
andi t1, t1, UART_LSR_THRE /* check for transmitter empty */
beqz t1, 201b /* try again */
+ nop
sb a0, UART_THR(t0) /* write the character */
--
2.7.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-09-08 6:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 6:25 Du Huanpeng [this message]
2020-09-08 11:39 ` Antony Pavlov
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=1599546305-10121-1-git-send-email-u74147@gmail.com \
--to=u74147@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