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

Caleb Connolly caleb.connolly at linaro.org
Mon Apr 15 13:46:22 CEST 2024



On 15/04/2024 11:49, Robert Marko wrote:
> 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.

Ah, I have a patch lying around to configure this automatically, but
didn't get around to sending it. Could you give it a test on your IPQ
board if I send it your way?

Kind regards,
> 
> 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>

-- 
// Caleb (they/them)


More information about the U-Boot mailing list