spl: Use CONFIG_SPL... instead of CONFIG_..._SPL_...
We like to put the SPL first so it is clear that it relates to SPL. Rename
various malloc-related options which have crept in, to stick to this
convention.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 1c2fe78..b9d96fb 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -402,21 +402,21 @@
location is used. Normally we put the device tree at the end of BSS
but with this option enabled, it goes at _image_binary_end.
-config SYS_SPL_MALLOC
+config SPL_SYS_MALLOC
bool "Enable malloc pool in SPL"
depends on SPL_FRAMEWORK
-config HAS_CUSTOM_SPL_MALLOC_START
+config SPL_HAS_CUSTOM_MALLOC_START
bool "For the SPL malloc pool, define a custom starting address"
- depends on SYS_SPL_MALLOC
+ depends on SPL_SYS_MALLOC
-config CUSTOM_SYS_SPL_MALLOC_ADDR
+config SPL_CUSTOM_SYS_MALLOC_ADDR
hex "SPL malloc addr"
- depends on HAS_CUSTOM_SPL_MALLOC_START
+ depends on SPL_HAS_CUSTOM_MALLOC_START
-config SYS_SPL_MALLOC_SIZE
+config SPL_SYS_MALLOC_SIZE
hex "Size of the SPL malloc pool"
- depends on SYS_SPL_MALLOC
+ depends on SPL_SYS_MALLOC
default 0x100000
config SPL_READ_ONLY
diff --git a/common/spl/Kconfig.nxp b/common/spl/Kconfig.nxp
index fc696cf..53e9b9f 100644
--- a/common/spl/Kconfig.nxp
+++ b/common/spl/Kconfig.nxp
@@ -59,7 +59,7 @@
config SPL_RELOC_STACK
hex "Address of the start of the stack SPL will use after relocation."
help
- If unspecified, this is equal to CFG_SYS_SPL_MALLOC_START. Starting
+ If unspecified, this is equal to CFG_SPL_SYS_MALLOC_START. Starting
address of the malloc pool used in SPL. When this option is set the full
malloc is used in SPL and it is set up by spl_init() and before that, the
simple malloc() can be used if CONFIG_SYS_MALLOC_F is defined.
diff --git a/common/spl/spl.c b/common/spl/spl.c
index cd294e8..5c0cf9a 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -750,8 +750,8 @@
spl_set_bd();
-#if defined(CONFIG_SYS_SPL_MALLOC)
- mem_malloc_init(SYS_SPL_MALLOC_START, CONFIG_SYS_SPL_MALLOC_SIZE);
+#if defined(CONFIG_SPL_SYS_MALLOC)
+ mem_malloc_init(SPL_SYS_MALLOC_START, CONFIG_SPL_SYS_MALLOC_SIZE);
gd->flags |= GD_FLG_FULL_MALLOC_INIT;
#endif
if (!(gd->flags & GD_FLG_SPL_INIT)) {
@@ -882,7 +882,7 @@
default:
debug("Unsupported OS image.. Jumping nevertheless..\n");
}
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
+#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SPL_SYS_MALLOC_SIZE)
debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr,
gd->malloc_ptr / 1024);
#endif
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index b1668c0..1dfae1a 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -531,7 +531,7 @@
buf = malloc_cache_aligned(size);
if (!buf) {
pr_err("Could not get FIT buffer of %lu bytes\n", (ulong)size);
- pr_err("\tcheck CONFIG_SYS_SPL_MALLOC_SIZE\n");
+ pr_err("\tcheck CONFIG_SPL_SYS_MALLOC_SIZE\n");
buf = spl_get_load_buffer(0, size);
}
return buf;