From 8a9fc30f16acd127aaa9f24541d11fae1d972259 Mon Sep 17 00:00:00 2001 From: Sughosh Ganu Date: Mon, 26 Aug 2024 17:29:23 +0530 Subject: 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 Reviewed-by: Simon Glass --- include/lmb.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') 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); /** -- cgit v1.2.3