Merge patch series "fdt_support: improve board_fdt_chosen_bootargs() for flexibility"
authorTom Rini <trini@konsulko.com>
Tue, 14 Jan 2025 21:43:07 +0000 (15:43 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 14 Jan 2025 21:44:44 +0000 (15:44 -0600)
commite5ce3b44cc85cadb4b5a79b64838c85222cc16ef
treeb7285749252b59eec2113dc123346e2d805ff883
parent5c72a2afbfedeffefe48d1b67c7effb379f90669
parent1cfdac985298c65480bd2517ac4d6efb9337e89a
Merge patch series "fdt_support: improve board_fdt_chosen_bootargs() for flexibility"

Dmitry Rokosov <ddrokosov@salutedevices.com> says:

This series consists of three patches.

The first patch modifies the function documentation style in the
include/fdt_support.h file to comply with kernel-doc requirements.

The second patch modifies the board_fdt_chosen_bootargs() function to
return a const char* type. This change clarifies to the caller that the
returned string should neither be freed nor modified. It aligns with the
existing fdt_setprop() function, which already utilizes a const char*
parameter. This promotes consistency within the codebase and enhances
code safety by preventing unintended modifications to the returned
string.

The third patch addresses the need for flexibility in providing kernel
command line arguments (bootargs) for different kernel images within the
same U-Boot environment. It introduces a read-only (RO) fdt_property
argument to the board_fdt_chosen_bootargs() function, allowing access to
the original chosen/bootargs data. This is crucial for scenarios where
different kernel versions require distinct console setups (e.g., ttyS0
for vendor kernels and ttyAML0 for upstream kernels). By enabling board
developers to either merge or replace the original bootargs, this
patch enhances the configurability of U-Boot for various kernel
images without relying on outdated configurations like CMDLINE_EXTEND.

CI/CD results: https://github.com/u-boot/u-boot/pull/716/checks

Link: https://lore.kernel.org/r/20241220-board_fdt_chosen_bootargs_improvements-v1-0-f6a7181787c5@salutedevices.com
include/fdt_support.h