[PATCH v5 40/46] boot: Support IO UARTs for earlycon and console
Tom Rini
trini at konsulko.com
Wed Apr 2 16:28:58 CEST 2025
On Sat, Mar 15, 2025 at 02:26:00PM +0000, Simon Glass wrote:
> Update the string to take account of UARTs which are connected on I/O
> ports, as on x86.
>
> Fix a typo in an error message in the same command, while we are here.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v3)
>
> Changes in v3:
> - Add new patch to support IO UARTs for earlycon and console
>
> boot/bootflow.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/boot/bootflow.c b/boot/bootflow.c
> index 58a1afa7a75..4054a966af8 100644
> --- a/boot/bootflow.c
> +++ b/boot/bootflow.c
> @@ -942,8 +942,9 @@ int bootflow_cmdline_auto(struct bootflow *bflow, const char *arg)
> *buf = '\0';
> if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) {
> snprintf(buf, sizeof(buf),
> - "uart8250,mmio32,%#lx,%dn8", info.addr,
> - info.baudrate);
> + "uart8250,%s,%#lx,%dn8",
> + info.addr_space == SERIAL_ADDRESS_SPACE_IO ? "io" :
> + "mmio", info.addr, info.baudrate);
> } else if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_PL01X) {
> snprintf(buf, sizeof(buf),
> "pl011,mmio32,%#lx,%dn8", info.addr,
I suppose we're well past the point where we can delete
bootflow_cmdline_auto() itself because that's just going to lead us to
trouble down the line (5 years from now when the kernel adopts a new
preferred way to pass this info) and grows every platform by some amount
of space every time we add something new here.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250402/ca1b8413/attachment.sig>
More information about the U-Boot
mailing list