From: Tom Rini Date: Tue, 14 Jan 2025 21:43:07 +0000 (-0600) Subject: Merge patch series "fdt_support: improve board_fdt_chosen_bootargs() for flexibility" X-Git-Tag: v2025.04-rc1~58 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5ce3b44cc85cadb4b5a79b64838c85222cc16ef;p=pandora-u-boot.git Merge patch series "fdt_support: improve board_fdt_chosen_bootargs() for flexibility" Dmitry Rokosov 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 --- e5ce3b44cc85cadb4b5a79b64838c85222cc16ef diff --cc include/fdt_support.h index 9447a64e060,7731feba5f0..f0ad2e6b365 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@@ -211,7 -229,9 +229,9 @@@ int ft_board_setup(void *blob, struct b int board_rng_seed(struct abuf *buf); /** - * board_fdt_chosen_bootargs() - Arbitrarily amend fdt kernel command line + * board_fdt_chosen_bootargs() - arbitrarily amend fdt kernel command line + * - * @fdt_ba: FDT chosen/bootargs from the kernel image if available ++ * @fdt_ba: FDT /chosen/bootargs property from the kernel image if available * * This is used for late modification of kernel command line arguments just * before they are added into the /chosen node in flat device tree.