[PATCH v2 05/14] lmb: Rename LMB_MAX_REGIONS and LMB_USE_MAX_REGIONS
Simon Glass
sjg at chromium.org
Fri Sep 1 03:13:43 CEST 2023
These are the number of areas within a region, so rename them.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Add new patch to rename LMB_MAX_REGIONS and LMB_USE_MAX_REGIONS
configs/stm32mp13_defconfig | 4 ++--
configs/stm32mp15_basic_defconfig | 4 ++--
configs/stm32mp15_defconfig | 4 ++--
configs/stm32mp15_trusted_defconfig | 4 ++--
include/lmb.h | 10 +++++-----
lib/Kconfig | 6 +++---
lib/lmb.c | 4 ++--
7 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig
index 82b62744f6db..98fcfeb5fa61 100644
--- a/configs/stm32mp13_defconfig
+++ b/configs/stm32mp13_defconfig
@@ -74,5 +74,5 @@ CONFIG_OPTEE=y
# CONFIG_OPTEE_TA_AVB is not set
CONFIG_ERRNO_STR=y
# CONFIG_LMB_USE_MAX_REGIONS is not set
-CONFIG_LMB_MEMORY_REGIONS=2
-CONFIG_LMB_RESERVED_REGIONS=16
+CONFIG_LMB_MEMORY_AREAS=2
+CONFIG_LMB_RESERVED_AREAS=16
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
index 9ea5aaa7145a..7b5655d957d9 100644
--- a/configs/stm32mp15_basic_defconfig
+++ b/configs/stm32mp15_basic_defconfig
@@ -189,5 +189,5 @@ CONFIG_WDT_STM32MP=y
# CONFIG_BINMAN_FDT is not set
CONFIG_ERRNO_STR=y
# CONFIG_LMB_USE_MAX_REGIONS is not set
-CONFIG_LMB_MEMORY_REGIONS=2
-CONFIG_LMB_RESERVED_REGIONS=16
+CONFIG_LMB_MEMORY_AREAS=2
+CONFIG_LMB_RESERVED_AREAS=16
diff --git a/configs/stm32mp15_defconfig b/configs/stm32mp15_defconfig
index 4d0a81f8a871..643ec201c644 100644
--- a/configs/stm32mp15_defconfig
+++ b/configs/stm32mp15_defconfig
@@ -165,5 +165,5 @@ CONFIG_WDT_STM32MP=y
# CONFIG_BINMAN_FDT is not set
CONFIG_ERRNO_STR=y
# CONFIG_LMB_USE_MAX_REGIONS is not set
-CONFIG_LMB_MEMORY_REGIONS=2
-CONFIG_LMB_RESERVED_REGIONS=16
+CONFIG_LMB_MEMORY_AREAS=2
+CONFIG_LMB_RESERVED_AREAS=16
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index 0a7d8624858d..2a8162a870c5 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -165,5 +165,5 @@ CONFIG_WDT_STM32MP=y
# CONFIG_BINMAN_FDT is not set
CONFIG_ERRNO_STR=y
# CONFIG_LMB_USE_MAX_REGIONS is not set
-CONFIG_LMB_MEMORY_REGIONS=2
-CONFIG_LMB_RESERVED_REGIONS=16
+CONFIG_LMB_MEMORY_AREAS=2
+CONFIG_LMB_RESERVED_AREAS=16
diff --git a/include/lmb.h b/include/lmb.h
index 92332eb63069..d963ac28d9ac 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -46,11 +46,11 @@ struct lmb_area {
*
* case 2. CONFIG_LMB_USE_MAX_REGIONS is not defined, the size of each
* region is configurated *independently* with
- * => CONFIG_LMB_MEMORY_REGIONS: struct lmb.memory_regions
- * => CONFIG_LMB_RESERVED_REGIONS: struct lmb.reserved_regions
+ * => CONFIG_LMB_MEMORY_AREAS: struct lmb.memory_regions
+ * => CONFIG_LMB_RESERVED_AREAS: struct lmb.reserved_regions
* lmb_region.region is only a pointer to the correct buffer,
* initialized in lmb_init(). This configuration is useful to manage
- * more reserved memory regions with CONFIG_LMB_RESERVED_REGIONS.
+ * more reserved memory regions with CONFIG_LMB_RESERVED_AREAS.
*/
/**
@@ -87,8 +87,8 @@ struct lmb {
struct lmb_region memory;
struct lmb_region reserved;
#if !IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS)
- struct lmb_area memory_areas[CONFIG_LMB_MEMORY_REGIONS];
- struct lmb_area reserved_areas[CONFIG_LMB_RESERVED_REGIONS];
+ struct lmb_area memory_areas[CONFIG_LMB_MEMORY_AREAS];
+ struct lmb_area reserved_areas[CONFIG_LMB_RESERVED_AREAS];
#endif
};
diff --git a/lib/Kconfig b/lib/Kconfig
index 42e559ad0b51..53f1332a8f83 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -1082,7 +1082,7 @@ config LMB_USE_MAX_REGIONS
Define the number of supported memory regions in the library logical
memory blocks.
This feature allow to reduce the lmb library size by using compiler
- optimization when LMB_MEMORY_REGIONS == LMB_RESERVED_REGIONS.
+ optimization when LMB_MEMORY_AREAS == LMB_RESERVED_AREAS.
config LMB_MAX_REGIONS
int "Number of memory and reserved regions in lmb lib"
@@ -1092,7 +1092,7 @@ config LMB_MAX_REGIONS
Define the number of supported regions, memory and reserved, in the
library logical memory blocks.
-config LMB_MEMORY_REGIONS
+config LMB_MEMORY_AREAS
int "Number of memory regions in lmb lib"
depends on !LMB_USE_MAX_REGIONS
default 8
@@ -1101,7 +1101,7 @@ config LMB_MEMORY_REGIONS
memory blocks.
The minimal value is CONFIG_NR_DRAM_BANKS.
-config LMB_RESERVED_REGIONS
+config LMB_RESERVED_AREAS
int "Number of reserved regions in lmb lib"
depends on !LMB_USE_MAX_REGIONS
default 8
diff --git a/lib/lmb.c b/lib/lmb.c
index 2669868f0dda..f4321d10118b 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -111,8 +111,8 @@ void lmb_init(struct lmb *lmb)
lmb->memory.max = CONFIG_LMB_MAX_REGIONS;
lmb->reserved.max = CONFIG_LMB_MAX_REGIONS;
#else
- lmb->memory.max = CONFIG_LMB_MEMORY_REGIONS;
- lmb->reserved.max = CONFIG_LMB_RESERVED_REGIONS;
+ lmb->memory.max = CONFIG_LMB_MEMORY_AREAS;
+ lmb->reserved.max = CONFIG_LMB_RESERVED_AREAS;
lmb->memory.area = lmb->memory_areas;
lmb->reserved.area = lmb->reserved_areas;
#endif
--
2.42.0.283.g2d96d420d3-goog
More information about the U-Boot
mailing list