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>
#include <hang.h>
#include <image.h>
#include <irq_func.h>
+#include <lmb.h>
#include <log.h>
#include <net.h>
#include <asm/cache.h>
}
#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;
#ifdef CONFIG_CLOCKS
set_cpu_clk_info, /* Setup clock information */
#endif
+ initr_lmb,
#ifdef CONFIG_EFI_LOADER
efi_memory_init,
#endif
IS_ENABLED(CONFIG_SPL_ATF))
dram_init_banksize();
+ if (IS_ENABLED(CONFIG_SPL_LMB))
+ lmb_init();
+
if (CONFIG_IS_ENABLED(PCI) && !(gd->flags & GD_FLG_DM_DEAD)) {
ret = pci_init();
if (ret)