summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-12-12 21:07:26 -0600
committerTom Rini <[email protected]>2024-12-12 21:07:26 -0600
commita33185173dce550d6ecb96b7fa625bb5e2183d66 (patch)
treeadd17fdeadcdddc9eb7922c7c09486027812df40 /common
parent1fdf53ace13f745fe8ad4d2d4e79eed98088d555 (diff)
Revert "Merge patch series "vbe: Series part E""
This reverts commit 1fdf53ace13f745fe8ad4d2d4e79eed98088d555, reversing changes made to e5aef1bbf11412eebd4c242b46adff5301353c30. I had missed that this caused too much size growth on rcar3_salvator-x. Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/hash.c8
-rw-r--r--common/malloc_simple.c3
-rw-r--r--common/spl/Kconfig.vpl17
-rw-r--r--common/spl/spl.c15
-rw-r--r--common/spl/spl_atf.c36
-rw-r--r--common/spl/spl_fit.c12
-rw-r--r--common/spl/spl_legacy.c8
-rw-r--r--common/spl/spl_mmc.c6
8 files changed, 33 insertions, 72 deletions
diff --git a/common/hash.c b/common/hash.c
index 5d389420eff..db6925d6782 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -304,14 +304,6 @@ static struct hash_algo hash_algo[] = {
.hash_update = hash_update_crc16_ccitt,
.hash_finish = hash_finish_crc16_ccitt,
},
-#if CONFIG_IS_ENABLED(CRC8)
- {
- .name = "crc8",
- .digest_size = 1,
- .chunk_size = CHUNKSZ_CRC32,
- .hash_func_ws = crc8_wd_buf,
- },
-#endif
#if CONFIG_IS_ENABLED(CRC32)
{
.name = "crc32",
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index f0f90a095bd..5a8ec538f8f 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -26,8 +26,7 @@ static void *alloc_simple(size_t bytes, int align)
log_debug("size=%lx, ptr=%lx, limit=%x: ", (ulong)bytes, new_ptr,
gd->malloc_limit);
if (new_ptr > gd->malloc_limit) {
- log_err("alloc space exhausted ptr %lx limit %x\n", new_ptr,
- gd->malloc_limit);
+ log_err("alloc space exhausted\n");
return NULL;
}
diff --git a/common/spl/Kconfig.vpl b/common/spl/Kconfig.vpl
index eb57dfabea5..d06f36d4ee4 100644
--- a/common/spl/Kconfig.vpl
+++ b/common/spl/Kconfig.vpl
@@ -222,29 +222,12 @@ config VPL_SPI_FLASH_SUPPORT
lines). This enables the drivers in drivers/mtd/spi as part of a
VPL build. This normally requires VPL_SPI_SUPPORT.
-config VPL_SYS_MALLOC_SIMPLE
- bool "Only use malloc_simple functions in the VPL"
- default y
- help
- Say Y here to only use the *_simple malloc functions from
- malloc_simple.c, rather then using the versions from dlmalloc.c;
- this will make the VPL binary smaller at the cost of more heap
- usage as the *_simple malloc functions do not re-use free-ed mem.
-
config VPL_TEXT_BASE
hex "VPL Text Base"
default 0x0
help
The address in memory that VPL will be running from.
-config VPL_MAX_SIZE
- hex "Maximum size (in bytes) for the VPL stage"
- default 0x2e000 if ROCKCHIP_RK3399
- default 0x0
- help
- The maximum size (in bytes) of the TPL stage. This size is determined
- by the amount of internal SRAM memory.
-
config VPL_BINMAN_SYMBOLS
bool "Declare binman symbols in VPL"
depends on VPL_FRAMEWORK && BINMAN
diff --git a/common/spl/spl.c b/common/spl/spl.c
index ad31a2f8b6c..1ceb63daf31 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -631,13 +631,10 @@ static int boot_from_devices(struct spl_image_info *spl_image,
"Unsupported Boot Device!\n");
}
}
- if (loader) {
- ret = spl_load_image(spl_image, loader);
- if (!ret) {
- spl_image->boot_device = bootdev;
- return 0;
- }
- printf("Error: %d\n", ret);
+ if (loader &&
+ !spl_load_image(spl_image, loader)) {
+ spl_image->boot_device = bootdev;
+ return 0;
}
}
}
@@ -836,7 +833,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
*/
void preloader_console_init(void)
{
-#if CONFIG_IS_ENABLED(SERIAL)
+#ifdef CONFIG_SPL_SERIAL
gd->baudrate = CONFIG_BAUDRATE;
serial_init(); /* serial communications setup */
@@ -895,7 +892,7 @@ __weak void spl_relocate_stack_check(void)
*/
ulong spl_relocate_stack_gd(void)
{
-#if CONFIG_IS_ENABLED(STACK_R)
+#ifdef CONFIG_SPL_STACK_R
gd_t *new_gd;
ulong ptr = CONFIG_SPL_STACK_R_ADDR;
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 8bc5db77395..0397b86a33b 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -41,9 +41,9 @@ struct bl2_to_bl31_params_mem_v2 {
struct entry_point_info bl31_ep_info;
};
-struct bl31_params *bl2_plat_get_bl31_params_default(ulong bl32_entry,
- ulong bl33_entry,
- ulong fdt_addr)
+struct bl31_params *bl2_plat_get_bl31_params_default(uintptr_t bl32_entry,
+ uintptr_t bl33_entry,
+ uintptr_t fdt_addr)
{
static struct bl2_to_bl31_params_mem bl31_params_mem;
struct bl31_params *bl2_to_bl31_params;
@@ -100,17 +100,17 @@ struct bl31_params *bl2_plat_get_bl31_params_default(ulong bl32_entry,
return bl2_to_bl31_params;
}
-__weak struct bl31_params *bl2_plat_get_bl31_params(ulong bl32_entry,
- ulong bl33_entry,
- ulong fdt_addr)
+__weak struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry,
+ uintptr_t bl33_entry,
+ uintptr_t fdt_addr)
{
return bl2_plat_get_bl31_params_default(bl32_entry, bl33_entry,
fdt_addr);
}
-struct bl_params *bl2_plat_get_bl31_params_v2_default(ulong bl32_entry,
- ulong bl33_entry,
- ulong fdt_addr)
+struct bl_params *bl2_plat_get_bl31_params_v2_default(uintptr_t bl32_entry,
+ uintptr_t bl33_entry,
+ uintptr_t fdt_addr)
{
static struct bl2_to_bl31_params_mem_v2 bl31_params_mem;
struct bl_params *bl_params;
@@ -173,9 +173,9 @@ struct bl_params *bl2_plat_get_bl31_params_v2_default(ulong bl32_entry,
return bl_params;
}
-__weak struct bl_params *bl2_plat_get_bl31_params_v2(ulong bl32_entry,
- ulong bl33_entry,
- ulong fdt_addr)
+__weak struct bl_params *bl2_plat_get_bl31_params_v2(uintptr_t bl32_entry,
+ uintptr_t bl33_entry,
+ uintptr_t fdt_addr)
{
return bl2_plat_get_bl31_params_v2_default(bl32_entry, bl33_entry,
fdt_addr);
@@ -188,8 +188,8 @@ static inline void raw_write_daif(unsigned int daif)
typedef void __noreturn (*atf_entry_t)(struct bl31_params *params, void *plat_params);
-static void __noreturn bl31_entry(ulong bl31_entry, ulong bl32_entry,
- ulong bl33_entry, ulong fdt_addr)
+static void __noreturn bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry,
+ uintptr_t bl33_entry, uintptr_t fdt_addr)
{
atf_entry_t atf_entry = (atf_entry_t)bl31_entry;
void *bl31_params;
@@ -238,7 +238,7 @@ static int spl_fit_images_find(void *blob, int os)
return -FDT_ERR_NOTFOUND;
}
-ulong spl_fit_images_get_entry(void *blob, int node)
+uintptr_t spl_fit_images_get_entry(void *blob, int node)
{
ulong val;
int ret;
@@ -253,10 +253,10 @@ ulong spl_fit_images_get_entry(void *blob, int node)
void __noreturn spl_invoke_atf(struct spl_image_info *spl_image)
{
- ulong bl32_entry = 0;
- ulong bl33_entry = CONFIG_TEXT_BASE;
+ uintptr_t bl32_entry = 0;
+ uintptr_t bl33_entry = CONFIG_TEXT_BASE;
void *blob = spl_image->fdt_addr;
- ulong platform_param = (ulong)blob;
+ uintptr_t platform_param = (uintptr_t)blob;
int node;
/*
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index ac8462577ff..3160f573bfb 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -190,7 +190,7 @@ static int get_aligned_image_size(struct spl_load_info *info, int data_size,
/**
* load_simple_fit(): load the image described in a certain FIT node
* @info: points to information about the device to load data from
- * @fit_offset: the offset of the FIT image on the device
+ * @sector: the start sector of the FIT image on the device
* @ctx: points to the FIT context structure
* @node: offset of the DT node describing the image to load (relative
* to @fit)
@@ -243,14 +243,11 @@ static int load_simple_fit(struct spl_load_info *info, ulong fit_offset,
if (!fit_image_get_data_position(fit, node, &offset)) {
external_data = true;
} else if (!fit_image_get_data_offset(fit, node, &offset)) {
- log_debug("read offset %x = offset from fit %lx\n",
- offset, (ulong)offset + ctx->ext_data_offset);
offset += ctx->ext_data_offset;
external_data = true;
}
if (external_data) {
- ulong read_offset;
void *src_ptr;
/* External data */
@@ -273,10 +270,6 @@ static int load_simple_fit(struct spl_load_info *info, ulong fit_offset,
overhead = get_aligned_image_overhead(info, offset);
size = get_aligned_image_size(info, length, offset);
- read_offset = fit_offset + get_aligned_image_offset(info,
- offset);
- log_debug("reading from offset %x / %lx size %lx to %p: ",
- offset, read_offset, size, src_ptr);
if (info->read(info,
fit_offset +
@@ -343,7 +336,6 @@ static int load_simple_fit(struct spl_load_info *info, ulong fit_offset,
else
image_info->entry_point = FDT_ERROR;
}
- log_debug("- done loading\n");
upl_add_image(fit, node, load_addr, length);
@@ -870,7 +862,7 @@ int spl_load_fit_image(struct spl_image_info *spl_image,
{
struct bootm_headers images;
const char *fit_uname_config = NULL;
- ulong fdt_hack;
+ uintptr_t fdt_hack;
const char *uname;
ulong fw_data = 0, dt_data = 0, img_data = 0;
ulong fw_len = 0, dt_len = 0, img_len = 0;
diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
index b3efb3e630e..9252b3a3de0 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
@@ -16,11 +16,11 @@
#define LZMA_LEN (1 << 20)
-static void spl_parse_legacy_validate(ulong start, ulong size)
+static void spl_parse_legacy_validate(uintptr_t start, uintptr_t size)
{
- ulong spl_start = (ulong)_start;
- ulong spl_end = (ulong)&_image_binary_end;
- ulong end = start + size;
+ uintptr_t spl_start = (uintptr_t)_start;
+ uintptr_t spl_end = (uintptr_t)&_image_binary_end;
+ uintptr_t end = start + size;
if ((start >= spl_start && start < spl_end) ||
(end > spl_start && end <= spl_end) ||
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index fe4230170a0..1f696593216 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -81,10 +81,8 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev)
struct uclass *uc;
log_debug("Selecting MMC dev %d; seqs:\n", mmc_dev);
- if (_LOG_DEBUG) {
- uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
- log_debug("%d: %s\n", dev_seq(dev), dev->name);
- }
+ uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
+ log_debug("%d: %s\n", dev_seq(dev), dev->name);
ret = mmc_init_device(mmc_dev);
#else
ret = mmc_initialize(NULL);