summaryrefslogtreecommitdiff
path: root/include/init.h
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2026-06-17 10:48:19 +0300
committerTom Rini <[email protected]>2026-06-24 18:13:24 -0600
commit1174c99ab421168221be372bd83a4143bf5f167d (patch)
tree8cf44beda8b853593a111add53bfab27c0b06293 /include/init.h
parent47e9c542ee032e89f556adc73c2aeff3acb0e5a9 (diff)
treewide: move bi_dram[] from bd to gd
Currently, the bi_dram[] information is stored in the board info structure (bd). Because bd is only valid after reserve_board(), dram_init_banksize() must be called late in the initialization process. This limitation is problematic, as it forces us to rely on a variety of bespoke functions to determine board RAM, bank memory sizes, and other early setup requirements. By moving bi_dram[] into the global data (gd), we can run it earlier. This is particularly convenient since boards define their own dram_init_banksize() routines, which do not always rely on parsing Device Tree (DT) memory nodes. Additionally, U-Boot defaults to relocating to the top of the first memory bank. While boards currently use custom functions to override this behavior, having the DRAM bank information available earlier in gd makes relocating to a different bank trivial and standardizes the process. Reviewed-by: Anshul Dalal <[email protected]> Tested-by: Michal Simek <[email protected]> # Versal Gen 2 Vek385 Tested-by: Anshul Dalal <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]> Tested-by: Christophe Leroy (CS GROUP) <[email protected]>
Diffstat (limited to 'include/init.h')
-rw-r--r--include/init.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/init.h b/include/init.h
index c31ebd83b85..23466d3f153 100644
--- a/include/init.h
+++ b/include/init.h
@@ -80,7 +80,7 @@ int dram_init(void);
* dram_init_banksize() - Set up DRAM bank sizes
*
* This can be implemented by boards to set up the DRAM bank information in
- * gd->bd->bi_dram(). It is called just before relocation, after dram_init()
+ * gd->dram[] It is called just before relocation, after dram_init()
* is called.
*
* If this is not provided, a default implementation will try to set up a