Hi Jonas,

On 2026-07-08T22:05:26, Jonas Karlman <[email protected]> wrote:
> Kconfig: serial: Depend on correct xPL symbol
>
> Change xPL_SERIAL_PRESENT symbols to depend on the xPL_DM_SERIAL symbol
> intended for the related xPL phase instead of the DM_SERIAL symbol
> used for U-Boot proper to make CONFIG_IS_ENABLED(SERIAL_PRESENT) guards
> work as intended.
>
> Signed-off-by: Jonas Karlman <[email protected]>
>
> drivers/serial/Kconfig | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> @@ -81,7 +81,7 @@ config SPL_SERIAL_PRESENT
>  config TPL_SERIAL_PRESENT
>       bool "Provide a serial driver in TPL"
> -     depends on DM_SERIAL && TPL
> +     depends on TPL_DM_SERIAL

BTW this makes the workaround in ns16550.c redundant:

    /* TODO([email protected]): Integrate this into a macro like
CONFIG_IS_ENABLED */
    #if !defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_DM_SERIAL)

That guard sits inside CONFIG_IS_ENABLED(SERIAL_PRESENT), which with
this change already implies TPL_DM_SERIAL in a TPL build. Please can
you add a patch to drop it? I'd be happy to see that hack go :-)

> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> @@ -91,7 +91,7 @@ config TPL_SERIAL_PRESENT
>  config VPL_SERIAL_PRESENT
>       bool "Provide a serial driver in VPL"
> -     depends on DM_SERIAL && VPL
> +     depends on VPL_DM_SERIAL

Just below this, the help text says 'This option enables the full UART
in TPL' where it should say VPL - it would be nice to fix it here or
in a follow-up.

Reviewed-by: Simon Glass <[email protected]>

Regards,
Simon

Reply via email to