There could be two memory allocation scheme in SPL phase.
Explicitly print the corresponding error message.
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
buf = malloc_cache_aligned(size);
if (!buf) {
pr_err("Could not get FIT buffer of %lu bytes\n", (ulong)size);
- pr_err("\tcheck CONFIG_SPL_SYS_MALLOC_SIZE\n");
+
+ if (IS_ENABLED(CONFIG_SPL_SYS_MALLOC))
+ pr_err("\tcheck CONFIG_SPL_SYS_MALLOC_SIZE\n");
+ else
+ pr_err("\tcheck CONFIG_SPL_SYS_MALLOC_F_LEN\n");
+
buf = spl_get_load_buffer(0, size);
}
return buf;