diff options
| author | Svyatoslav Ryhel <[email protected]> | 2024-08-03 20:01:29 +0300 |
|---|---|---|
| committer | Svyatoslav Ryhel <[email protected]> | 2024-10-13 17:20:26 +0300 |
| commit | 539800bf9257d637831d3e8dfa04f95cdc43fa58 (patch) | |
| tree | a0c7b073403fd9f48cd1873dd237ed306a5fa583 | |
| parent | b515d7ae0de51a26f73b2ddb5ea4db0d95b67d7a (diff) | |
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 <[email protected]>
| -rw-r--r-- | arch/arm/mach-tegra/board2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 5c5838629b2..1704b021c5a 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -6,6 +6,7 @@ #include <config.h> #include <dm.h> +#include <dm/root.h> #include <env.h> #include <errno.h> #include <init.h> @@ -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 |
