[PATCH 26/50] debug_ll ns16550: Do not define PUTC_LL()
Sascha Hauer
s.hauer at pengutronix.de
Fri Mar 3 01:21:07 PST 2023
The ns16550 debug_ll helper always defines PUTC_LL() when included.
This is not always desired, so rename it to debug_ll_ns16550_putc()
and let the user define PUTC_LL() when desired.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
include/debug_ll/ns16550.h | 2 +-
include/mach/bcm283x/debug_ll.h | 10 ++++++++++
include/mach/layerscape/debug_ll.h | 5 +++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/debug_ll/ns16550.h b/include/debug_ll/ns16550.h
index a4ca7332d3..a3ea5fcfcc 100644
--- a/include/debug_ll/ns16550.h
+++ b/include/debug_ll/ns16550.h
@@ -29,7 +29,7 @@
#define NS16550_LCR_BKSE 0x80 /* Bank select enable */
-static inline void PUTC_LL(char ch)
+static inline void debug_ll_ns16550_putc(char ch)
{
while (!(debug_ll_read_reg(NS16550_LSR) & NS16550_LSR_THRE))
;
diff --git a/include/mach/bcm283x/debug_ll.h b/include/mach/bcm283x/debug_ll.h
index 424de8be4e..e89328340a 100644
--- a/include/mach/bcm283x/debug_ll.h
+++ b/include/mach/bcm283x/debug_ll.h
@@ -67,6 +67,11 @@ static inline void debug_ll_init(void)
debug_ll_ns16550_init(divisor);
}
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
#elif defined CONFIG_DEBUG_RPI4_MINI_UART
static inline uint8_t debug_ll_read_reg(int reg)
@@ -86,6 +91,11 @@ static inline void debug_ll_init(void)
/* Configured by ROM */
}
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
#else
static inline void debug_ll_init(void)
diff --git a/include/mach/layerscape/debug_ll.h b/include/mach/layerscape/debug_ll.h
index e731de29b6..0ed12f3f42 100644
--- a/include/mach/layerscape/debug_ll.h
+++ b/include/mach/layerscape/debug_ll.h
@@ -33,4 +33,9 @@ static inline void debug_ll_init(void)
debug_ll_ns16550_init(divisor);
}
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
#endif /* __MACH_LAYERSCAPE_DEBUG_LL_H__ */
--
2.30.2
More information about the barebox
mailing list