summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-07-21 19:33:05 -0400
committerTom Rini <trini@konsulko.com>2023-07-21 19:33:05 -0400
commit247aa5a191159ea7e03bf1918e22fbbb784cd410 (patch)
tree56297e86b3ac1b199488643da8322f2f623159a2 /common
parent226ecf8be4c6a29caa86d1c9f33d5794c5732375 (diff)
parent373991d6939b01c47b352b1f620ef772419a9cf4 (diff)
Merge branch '2023-07-21-assorted-TI-platform-updates'
- The first half of a number of TI platform bugfixes and improvements, primarily around K3 platforms and splash screen support.
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig1
-rw-r--r--common/board_f.c11
-rw-r--r--common/spl/spl.c23
-rw-r--r--common/splash_source.c6
4 files changed, 25 insertions, 16 deletions
diff --git a/common/Kconfig b/common/Kconfig
index f5ad63ce166..973482f0756 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1167,7 +1167,6 @@ config IO_TRACE
config BMP
bool "Enable bmp image display"
- default y if CMD_BMP
help
Enable bmp functions to display bmp image and get bmp info.
diff --git a/common/board_f.c b/common/board_f.c
index e5969ec9a27..7d2c380e91e 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -411,7 +411,16 @@ __weak int arch_reserve_mmu(void)
static int reserve_video(void)
{
- if (IS_ENABLED(CONFIG_VIDEO)) {
+ if (IS_ENABLED(CONFIG_SPL_VIDEO) && spl_phase() > PHASE_SPL &&
+ CONFIG_IS_ENABLED(BLOBLIST)) {
+ struct video_handoff *ho;
+
+ ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho));
+ if (!ho)
+ return log_msg_ret("blf", -ENOENT);
+ video_reserve_from_bloblist(ho);
+ gd->relocaddr = ho->fb;
+ } else if (CONFIG_IS_ENABLED(VIDEO)) {
ulong addr;
int ret;
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d74acec10b5..f09bb977814 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -891,18 +891,18 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
debug("Failed to stash bootstage: err=%d\n", ret);
#endif
-#if defined(CONFIG_SPL_VIDEO)
- struct udevice *dev;
- int rc;
-
- rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
- if (!rc && dev) {
- rc = device_remove(dev, DM_REMOVE_NORMAL);
- if (rc)
- printf("Cannot remove video device '%s' (err=%d)\n",
- dev->name, rc);
+ if (IS_ENABLED(CONFIG_SPL_VIDEO_REMOVE)) {
+ struct udevice *dev;
+ int rc;
+
+ rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
+ if (!rc && dev) {
+ rc = device_remove(dev, DM_REMOVE_NORMAL);
+ if (rc)
+ printf("Cannot remove video device '%s' (err=%d)\n",
+ dev->name, rc);
+ }
}
-#endif
spl_board_prepare_for_boot();
jump_to_image_no_args(&spl_image);
@@ -992,6 +992,7 @@ ulong spl_relocate_stack_gd(void)
#endif
/* Get stack position: use 8-byte alignment for ABI compliance */
ptr = CONFIG_SPL_STACK_R_ADDR - roundup(sizeof(gd_t),16);
+ gd->start_addr_sp = ptr;
new_gd = (gd_t *)ptr;
memcpy(new_gd, (void *)gd, sizeof(gd_t));
#if CONFIG_IS_ENABLED(DM)
diff --git a/common/splash_source.c b/common/splash_source.c
index a2601376198..7223a1aae78 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -363,7 +363,7 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
if (res < 0)
return res;
- img_header = (struct legacy_img_hdr *)bmp_load_addr;
+ img_header = (struct legacy_img_hdr *)(uintptr_t)bmp_load_addr;
if (image_get_magic(img_header) != FDT_MAGIC) {
printf("Could not find FDT magic\n");
return -EINVAL;
@@ -373,7 +373,7 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
/* Read in entire FIT */
fit_header = (const u32 *)(bmp_load_addr + header_size);
- res = splash_storage_read_raw(location, (u32)fit_header, fit_size);
+ res = splash_storage_read_raw(location, (uintptr_t)fit_header, fit_size);
if (res < 0)
return res;
@@ -398,7 +398,7 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
/* Extract the splash data from FIT */
/* 1. Test if splash is in FIT internal data. */
if (!fit_image_get_data(fit_header, node_offset, &internal_splash_data, &internal_splash_size))
- memmove((void *)bmp_load_addr, internal_splash_data, internal_splash_size);
+ memmove((void *)(uintptr_t)bmp_load_addr, internal_splash_data, internal_splash_size);
/* 2. Test if splash is in FIT external data with fixed position. */
else if (!fit_image_get_data_position(fit_header, node_offset, &external_splash_addr))
is_splash_external = true;