diff options
author | Tom Rini <trini@konsulko.com> | 2025-07-09 08:40:36 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-07-09 08:40:36 -0600 |
commit | 971bd7614c5df1b77063fab9b0a5cae6afc77d3b (patch) | |
tree | f556bc0a56e611b08c54febbc4fb79fed8d131c4 /boot/image-fdt.c | |
parent | 074e05952705972072f52128cf2e3ec2d8f35de6 (diff) | |
parent | a03f4a632bf7c2337586394e5e7db6b368cfb37f (diff) |
Merge patch series "Improve Verdin AM62P thermal setup by generalizing ft_board_setup_ex()"
João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com> says:
In some use cases, board-specific device tree changes must not be overwritten
by system fixups. Although U-Boot provides ft_board_setup_ex() for this
purpose, it is currently only used on TI Keystone. This series makes
ft_board_setup_ex() a generic option, allowing its use by other architectures
and boards.
Additionally, considering that Toradex Verdin-AM62P hardware lifetime
guarantees are based on a 105°C junction temperature (while TI AM62Px supports
up to 125°C), this series implements necessary changes within TI K3 AM62P and
Toradex board code. These changes include exporting common fixup device Tree
functions used in TI K3 for board-code access and also fixup for AM62P thermal
zones to correctly reflect the number of CPU nodes according to the SoC part
number.
Link: https://lore.kernel.org/r/20250623-am62p-fdt-fixup-trip-points-v1-0-12355eb6a72f@toradex.com
Diffstat (limited to 'boot/image-fdt.c')
-rw-r--r-- | boot/image-fdt.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 97b6385ab7c..3f0ac54f76f 100644 --- a/boot/image-fdt.c +++ b/boot/image-fdt.c @@ -587,6 +587,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb) { ulong *initrd_start = &images->initrd_start; ulong *initrd_end = &images->initrd_end; + bool skip_board_fixup = false; int ret, fdt_ret, of_size; if (IS_ENABLED(CONFIG_OF_ENV_SETUP)) { @@ -637,18 +638,18 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb) fdt_fixup_pstore(blob); #endif if (IS_ENABLED(CONFIG_OF_BOARD_SETUP)) { - const char *skip_board_fixup; + skip_board_fixup = (env_get_ulong("skip_board_fixup", 10, 0) == 1); - skip_board_fixup = env_get("skip_board_fixup"); - if (skip_board_fixup && ((int)simple_strtol(skip_board_fixup, NULL, 10) == 1)) { - printf("skip board fdt fixup\n"); - } else { - fdt_ret = ft_board_setup(blob, gd->bd); - if (fdt_ret) { - printf("ERROR: board-specific fdt fixup failed: %s\n", - fdt_strerror(fdt_ret)); - goto err; - } + if (skip_board_fixup) + printf("skip all board fdt fixup\n"); + } + + if (IS_ENABLED(CONFIG_OF_BOARD_SETUP) && !skip_board_fixup) { + fdt_ret = ft_board_setup(blob, gd->bd); + if (fdt_ret) { + printf("ERROR: board-specific fdt fixup failed: %s\n", + fdt_strerror(fdt_ret)); + goto err; } } if (IS_ENABLED(CONFIG_OF_SYSTEM_SETUP)) { @@ -710,10 +711,8 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb) } } -#if defined(CONFIG_ARCH_KEYSTONE) - if (IS_ENABLED(CONFIG_OF_BOARD_SETUP)) + if (IS_ENABLED(CONFIG_OF_BOARD_SETUP_EXTENDED) && !skip_board_fixup) ft_board_setup_ex(blob, gd->bd); -#endif return 0; err: |