[PATCH v1] board: ti: am33xx: Fix serial_getc comparision in spl_start_uboot()

Kory Maincent kory.maincent at bootlin.com
Fri Sep 5 13:25:10 CEST 2025


On Fri,  5 Sep 2025 16:15:34 +0530
Sidharth Seela <sidharthseela at gmail.com> wrote:

> Fixes issue of uninterruptible SPL boot to OS, in falcon mode.
> Correct order of logical AND operation is (serial_tstc() && ( serial_getc() ==
> 'c')), which fixes (serial_tstc() && serial_getc == 'c').

This seems weird. == precede in terms of priority to &&, therefore the
parentheses should not be needed here. 

> > Signed-off-by: Sidharth Seela <sidharthseela at gmail.com>
> Cc: Tom Rini <trini at konsulko.com> 
> ---
> 
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 4ada8b534c1..1fb7d165d0b 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -252,7 +252,7 @@ int spl_start_uboot(void)
>  {
>  #ifdef CONFIG_SPL_SERIAL
>  	/* break into full u-boot on 'c' */
> -	if (serial_tstc() && serial_getc() == 'c')
> +	if (serial_tstc() && (serial_getc() == 'c'))
>  		return 1;
>  #endif
>  



-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


More information about the U-Boot mailing list