summaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@linaro.org>2024-08-26 17:29:28 +0530
committerTom Rini <trini@konsulko.com>2024-09-03 14:08:50 -0600
commitb6400de7e03cdd5e93195bf260dc7ab9f68aea8f (patch)
treee91533d856c5eaf61d128cc0e2f6da19a14c12ed /common/board_r.c
parentc2c50d52d9474ed8d6796d3def2083d5ad549dcc (diff)
lmb: init: initialise the lmb data structures during board init
The memory map maintained by the LMB module is now persistent and global. This memory map is being maintained through the alloced list structure which can be extended at runtime -- there is one list for the available memory, and one for the used memory. Allocate and initialise these lists during the board init. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c
index f445803d7a4..a60da39a29e 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -22,6 +22,7 @@
#include <hang.h>
#include <image.h>
#include <irq_func.h>
+#include <lmb.h>
#include <log.h>
#include <net.h>
#include <asm/cache.h>
@@ -510,6 +511,14 @@ int initr_mem(void)
}
#endif
+static int initr_lmb(void)
+{
+ if (CONFIG_IS_ENABLED(LMB))
+ return lmb_init();
+ else
+ return 0;
+}
+
static int dm_announce(void)
{
int device_count;
@@ -612,6 +621,7 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_CLOCKS
set_cpu_clk_info, /* Setup clock information */
#endif
+ initr_lmb,
#ifdef CONFIG_EFI_LOADER
efi_memory_init,
#endif