summaryrefslogtreecommitdiff
path: root/include/lmb.h
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@linaro.org>2024-08-26 17:29:23 +0530
committerTom Rini <trini@konsulko.com>2024-09-03 14:08:50 -0600
commit8a9fc30f16acd127aaa9f24541d11fae1d972259 (patch)
tree9aec2114435b5279f0fdc9c302e536a5d8e2bb63 /include/lmb.h
parent6942bdb42aefdc7e5bdf17624408e49df725fa45 (diff)
lmb: introduce a function to add memory to the lmb memory map
Introduce a function lmb_add_memory() to add available memory to the LMB memory map. Call this function during board init once the LMB data structures have been initialised. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/lmb.h')
-rw-r--r--include/lmb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/lmb.h b/include/lmb.h
index cc2c426c13b..70191456e5e 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -66,6 +66,17 @@ int lmb_init(void);
void lmb_init_and_reserve(struct bd_info *bd, void *fdt_blob);
void lmb_init_and_reserve_range(phys_addr_t base, phys_size_t size,
void *fdt_blob);
+
+/**
+ * lmb_add_memory() - Add memory range for LMB allocations
+ *
+ * Add the entire available memory range to the pool of memory that
+ * can be used by the LMB module for allocations.
+ *
+ * Return: None
+ */
+void lmb_add_memory(void);
+
long lmb_add(phys_addr_t base, phys_size_t size);
long lmb_reserve(phys_addr_t base, phys_size_t size);
/**