From: Svyatoslav Ryhel Date: Sat, 3 Aug 2024 17:01:29 +0000 (+0300) Subject: ARM: tegra: board2: add common dtb reselect logic X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-logo.png?a=commitdiff_plain;h=539800bf9257d637831d3e8dfa04f95cdc43fa58;p=u-boot.git ARM: tegra: board2: add common dtb reselect logic Add common logic for dynamic dtb switch and DM reload if board features multi-dtb support. Signed-off-by: Svyatoslav Ryhel --- diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 5c5838629b..1704b021c5 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -457,3 +458,18 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size) return CFG_SYS_SDRAM_BASE + usable_ram_size_below_4g(); } + +#if IS_ENABLED(CONFIG_DTB_RESELECT) +int embedded_dtb_select(void) +{ + int ret, rescan; + + ret = fdtdec_resetup(&rescan); + if (!ret && rescan) { + dm_uninit(); + dm_init_and_scan(true); + } + + return 0; +} +#endif