mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <>
Cc: Jules Maselbas <>
Subject: [PATCH] debug_ll: ns16550: Fix interrupt disable on init
Date: Mon,  4 Oct 2021 09:38:42 +0200
Message-ID: <> (raw)

The debug_ll_write_reg function takes first the register
and secondly the value to write, which in this call were
inverted. Fix the argument order.

Signed-off-by: Jules Maselbas <>
 include/debug_ll/ns16550.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/debug_ll/ns16550.h b/include/debug_ll/ns16550.h
index 7e4dbeb453..373c917d86 100644
--- a/include/debug_ll/ns16550.h
+++ b/include/debug_ll/ns16550.h
@@ -43,7 +43,7 @@ static inline uint16_t debug_ll_ns16550_calc_divisor(unsigned long clk)
 static inline void debug_ll_ns16550_init(uint16_t divisor)
 	debug_ll_write_reg(NS16550_LCR, 0x0); /* select ier reg */
-        debug_ll_write_reg(0x00, NS16550_IER);
+	debug_ll_write_reg(NS16550_IER, 0x0); /* disable interrupts */
 	debug_ll_write_reg(NS16550_LCR, NS16550_LCR_BKSE);
 	debug_ll_write_reg(NS16550_DLL, divisor & 0xff);

barebox mailing list

             reply	other threads:[~2021-10-04  7:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04  7:38 Jules Maselbas [this message]
2021-11-18 12:33 ` Jules Maselbas
2021-11-22  9:10   ` Sascha Hauer
2021-11-22  9:09 ` Sascha Hauer

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ \
	public-inbox-index barebox

Example config snippet for mirrors.

AGPL code for this site: git clone