* [PATCH] ARM: k3: fix debug_ll
@ 2024-11-07 7:28 Sascha Hauer
2024-11-08 9:52 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2024-11-07 7:28 UTC (permalink / raw)
To: Barebox List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: k3: fix debug_ll
2024-11-07 7:28 [PATCH] ARM: k3: fix debug_ll Sascha Hauer
@ 2024-11-08 9:52 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-11-08 9:52 UTC (permalink / raw)
To: Barebox List, Sascha Hauer
On Thu, 07 Nov 2024 08:28:44 +0100, Sascha Hauer wrote:
> 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.
>
>
Applied, thanks!
[1/1] ARM: k3: fix debug_ll
https://git.pengutronix.de/cgit/barebox/commit/?id=a85889bbfba4 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-08 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-07 7:28 [PATCH] ARM: k3: fix debug_ll Sascha Hauer
2024-11-08 9:52 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox