[PATCH v4 04/14] ARM: mvebu: rename PUTC_LL to MVEBU_PUTC_LL
Luca Lauro
famlauro93l at gmail.com
Fri Aug 21 05:26:46 PDT 2026
Il giorno ven 21 ago 2026 alle ore 12:38 Sascha Hauer
<s.hauer at pengutronix.de> ha scritto:
>
> On 2026-08-13 17:26, Luca Lauro via B4 Relay wrote:
> > From: Luca Lauro <famlauro93l at gmail.com>
> >
> > The name PUTC_LL is used by multiple architectures in barebox for their
> > early low-level UART output helpers. Since these functions differ between
> > SoCs and are defined in architecture-specific debug_ll headers, using the
> > same global name can lead to collisions or accidental overrides when
> > including multiple debug_ll headers.
> >
> > To avoid such namespace conflicts and to make the origin of the function
> > explicit, rename the mvebu-specific PUTC_LL to MVEBU_PUTC_LL.
>
> This patch is wrong. The idea of PUTC_LL is that the implementations are
> all included exclusively. See arch/arm/include/asm/debug_ll.h which
> includes exactly one SoC header file. You shouldn't include
> mach/mvebu/debug_ll.h directly, but instead only indirectly via
> include/debug_ll.h.
>
> Did you see any specific link failures/duplicate definitions that
> motivated you to this patch?
You’re right, the rename was not motivated by link failures, but by the
fact that PUTC_LL wasn’t working on RN102/RN104 at the time. The board
was not yet selecting the correct mvebu debug_ll implementation, so the
generic PUTC_LL variant was being used, which resulted in no UART output
during lowlevel init.
Renaming the function and calling it directly from the board code was a
workaround to ensure early UART output while the board support was still
in progress.
Now that RN102/RN104 correctly select the mvebu debug_ll path, the
standard PUTC_LL implementation works as intended, and the workaround is
no longer necessary. I will drop this patch in v5.
>
> Sascha
>
> >
> > Signed-off-by: Luca Lauro <famlauro93l at gmail.com>
> > ---
> > include/mach/mvebu/debug_ll.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/mach/mvebu/debug_ll.h b/include/mach/mvebu/debug_ll.h
> > index cf08776d4f..cd81b27e39 100644
> > --- a/include/mach/mvebu/debug_ll.h
> > +++ b/include/mach/mvebu/debug_ll.h
> > @@ -15,7 +15,7 @@
> >
> > #define EARLY_UART UARTn_BASE(CONFIG_MVEBU_CONSOLE_UART)
> >
> > -static inline void PUTC_LL(char c)
> > +static inline void MVEBU_PUTC_LL(char c)
> > {
> > /* Wait until there is space in the FIFO */
> > while (!(readl(EARLY_UART + UART_LSR) & LSR_THRE))
> >
> > --
> > 2.47.3
> >
> >
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
More information about the barebox
mailing list