From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] ARM: k3: fix debug_ll
Date: Thu, 7 Nov 2024 08:28:44 +0100 [thread overview]
Message-ID: <20241107072844.1797835-1-s.hauer@pengutronix.de> (raw)
commit e64990099c8f ("debug_ll ns16550: Add base address argument to
register functions") missed the change for k3. Add the change to fix
k3 debug_ll support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/mach/k3/debug_ll.h | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/include/mach/k3/debug_ll.h b/include/mach/k3/debug_ll.h
index 2433bb8f2e..29bd4015ab 100644
--- a/include/mach/k3/debug_ll.h
+++ b/include/mach/k3/debug_ll.h
@@ -16,19 +16,13 @@
#define __K3_UART_BASE(soc, num) soc##_UART##num##_BASE
#define K3_UART_BASE(soc, num) __K3_UART_BASE(soc, num)
-static inline uint8_t debug_ll_read_reg(int reg)
+static inline uint8_t debug_ll_read_reg(void __iomem *base, int reg)
{
- void __iomem *base = (void *)K3_UART_BASE(K3_DEBUG_SOC,
- CONFIG_DEBUG_K3_UART_PORT);
-
return readb(base + (reg << 2));
}
-static inline void debug_ll_write_reg(int reg, uint8_t val)
+static inline void debug_ll_write_reg(void __iomem *base, int reg, uint8_t val)
{
- void __iomem *base = (void *)K3_UART_BASE(K3_DEBUG_SOC,
- CONFIG_DEBUG_K3_UART_PORT);
-
writeb(val, base + (reg << 2));
}
@@ -41,7 +35,10 @@ static inline void debug_ll_init(void)
static inline void PUTC_LL(int c)
{
- debug_ll_ns16550_putc(c);
+ void __iomem *base = (void *)K3_UART_BASE(K3_DEBUG_SOC,
+ CONFIG_DEBUG_K3_UART_PORT);
+
+ debug_ll_ns16550_putc(base, c);
}
#endif
--
2.39.5
next reply other threads:[~2024-11-07 7:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 7:28 Sascha Hauer [this message]
2024-11-08 9:52 ` 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:
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=20241107072844.1797835-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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