[PATCH 3/3] serial: msm_serial: set .clk_bit_rate in debug UART

Robert Marko robert.marko at sartura.hr
Mon Apr 15 12:49:27 CEST 2024


Currently, .clk_bit_rate is not being set in init_serial_data for debug
UART, but its then used uart_dm_init() and this breaks debug UART on
IPQ40xx.

So, lets populate .clk_bit_rate for debug UART as well.
IPQ40xx requires special value of 0xff, so set it if ARCH_IPQ40XX is
selected, otherwise default to the same value that regular DM UART
will use.

Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
 drivers/serial/serial_msm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
index 8044d38518..80069f5cfb 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -242,6 +242,11 @@ U_BOOT_DRIVER(serial_msm) = {
 
 static struct msm_serial_data init_serial_data = {
 	.base = CONFIG_VAL(DEBUG_UART_BASE),
+#ifdef CONFIG_ARCH_IPQ40XX
+	.clk_bit_rate = 0xff,
+#else
+	.clk_bit_rate = UART_DM_CLK_RX_TX_BIT_RATE,
+#endif
 };
 
 #include <debug_uart.h>
-- 
2.44.0



More information about the U-Boot mailing list