[PATCH 12/20] ARM: K3: use debug_ll code for regular PBL console
Sascha Hauer
s.hauer at pengutronix.de
Fri Nov 29 03:44:27 PST 2024
Move parts of the K3 debug_ll code outside the #ifdef
CONFIG_DEBUG_AM62X_UART. This allows us to use the debug_ll provided
functions as a regular console with pbl_set_putc().
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
include/mach/k3/debug_ll.h | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/include/mach/k3/debug_ll.h b/include/mach/k3/debug_ll.h
index a37b50c726..13321c6134 100644
--- a/include/mach/k3/debug_ll.h
+++ b/include/mach/k3/debug_ll.h
@@ -2,20 +2,6 @@
#define __MACH_K3_DEBUG_LL_H__
#include <io.h>
-#define AM62X_UART_UART0_BASE 0x02800000
-#define AM62X_UART_UART1_BASE 0x02810000
-#define AM62X_UART_UART2_BASE 0x02820000
-#define AM62X_UART_UART3_BASE 0x02830000
-#define AM62X_UART_UART4_BASE 0x02840000
-#define AM62X_UART_UART5_BASE 0x02850000
-#define AM62X_UART_UART6_BASE 0x02860000
-
-#if defined CONFIG_DEBUG_AM62X_UART
-#define K3_DEBUG_SOC AM62X_UART
-
-#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(void __iomem *base, int reg)
{
return readb(base + (reg << 2));
@@ -28,11 +14,6 @@ static inline void debug_ll_write_reg(void __iomem *base, int reg, uint8_t val)
#include <debug_ll/ns16550.h>
-static inline void debug_ll_init(void)
-{
- /* already configured */
-}
-
static inline void k3_debug_ll_init(void __iomem *base)
{
debug_ll_ns16550_init(base, 26);
@@ -41,6 +22,25 @@ static inline void k3_debug_ll_init(void __iomem *base)
debug_ll_write_reg(base, 8, 0x00);
}
+#define AM62X_UART_UART0_BASE 0x02800000
+#define AM62X_UART_UART1_BASE 0x02810000
+#define AM62X_UART_UART2_BASE 0x02820000
+#define AM62X_UART_UART3_BASE 0x02830000
+#define AM62X_UART_UART4_BASE 0x02840000
+#define AM62X_UART_UART5_BASE 0x02850000
+#define AM62X_UART_UART6_BASE 0x02860000
+
+#if defined CONFIG_DEBUG_AM62X_UART
+#define K3_DEBUG_SOC AM62X_UART
+
+#define __K3_UART_BASE(soc, num) soc##_UART##num##_BASE
+#define K3_UART_BASE(soc, num) __K3_UART_BASE(soc, num)
+
+static inline void debug_ll_init(void)
+{
+ /* already configured */
+}
+
static inline void PUTC_LL(int c)
{
void __iomem *base = (void *)K3_UART_BASE(K3_DEBUG_SOC,
--
2.39.5
More information about the barebox
mailing list