[PATCH 27/50] debug_ll ns16550: Use CONFIG_BAUDRATE
Sascha Hauer
s.hauer at pengutronix.de
Fri Mar 3 01:21:08 PST 2023
the ns16550 debug_ll helper hardcodes a baudrate of 115200 baud.
The desired baudrate is specified in CONFIG_BAUDRATE, so use that
instead.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
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 a3ea5fcfcc..373e1df32a 100644
--- a/include/debug_ll/ns16550.h
+++ b/include/debug_ll/ns16550.h
@@ -39,7 +39,7 @@ static inline void debug_ll_ns16550_putc(char ch)
static inline uint16_t debug_ll_ns16550_calc_divisor(unsigned long clk)
{
- return clk / (115200 * 16);
+ return clk / (CONFIG_BAUDRATE * 16);
}
static inline void debug_ll_ns16550_init(uint16_t divisor)
--
2.30.2
More information about the barebox
mailing list