]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
common/splash_source.c: Change bmp_load_addr to ulong from u32
authorTom Rini <trini@konsulko.com>
Wed, 2 Jul 2025 01:05:18 +0000 (19:05 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 30 Dec 2025 17:23:00 +0000 (11:23 -0600)
The variable bmp_load_addr is used to hold the address in memory of
where to put the splash image (as a bmp). For 32/64bit correctness, this
needs to be a ulong and not u32 today.

Signed-off-by: Tom Rini <trini@konsulko.com>
common/splash_source.c

index 2df78a4f2d76c0c2bda66b0b08ec97affd763f0f..0710e302ba1ffcf522aad03febfbb6497164d751 100644 (file)
@@ -26,7 +26,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_SPI_FLASH
 static struct spi_flash *sf;
-static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_sf_read_raw(ulong bmp_load_addr, int offset, size_t read_size)
 {
        if (!sf) {
                sf = spi_flash_probe(CONFIG_SF_DEFAULT_BUS,
@@ -40,7 +40,7 @@ static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
        return spi_flash_read(sf, offset, read_size, (void *)(uintptr_t)bmp_load_addr);
 }
 #else
-static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_sf_read_raw(ulong bmp_load_addr, int offset, size_t read_size)
 {
        debug("%s: sf support not available\n", __func__);
        return -ENOSYS;
@@ -48,7 +48,7 @@ static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
 #endif
 
 #ifdef CONFIG_CMD_NAND
-static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_nand_read_raw(ulong bmp_load_addr, int offset, size_t read_size)
 {
        struct mtd_info *mtd = get_nand_dev_by_index(nand_curr_device);
        return nand_read_skip_bad(mtd, offset,
@@ -57,14 +57,14 @@ static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
                                  (u_char *)bmp_load_addr);
 }
 #else
-static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_nand_read_raw(ulong bmp_load_addr, int offset, size_t read_size)
 {
        debug("%s: nand support not available\n", __func__);
        return -ENOSYS;
 }
 #endif
 
-static int splash_mmc_read_raw(u32 bmp_load_addr, struct splash_location *location,
+static int splash_mmc_read_raw(ulong bmp_load_addr, struct splash_location *location,
                               size_t read_size)
 {
        struct disk_partition partition;
@@ -89,7 +89,7 @@ static int splash_mmc_read_raw(u32 bmp_load_addr, struct splash_location *locati
 }
 
 static int splash_storage_read_raw(struct splash_location *location,
-                              u32 bmp_load_addr, size_t read_size)
+                              ulong bmp_load_addr, size_t read_size)
 {
        u32 offset;
 
@@ -111,7 +111,7 @@ static int splash_storage_read_raw(struct splash_location *location,
        return -EINVAL;
 }
 
-static int splash_load_raw(struct splash_location *location, u32 bmp_load_addr)
+static int splash_load_raw(struct splash_location *location, ulong bmp_load_addr)
 {
        struct bmp_header *bmp_hdr;
        int res;
@@ -252,7 +252,7 @@ static inline int splash_umount_ubifs(void)
 
 #define SPLASH_SOURCE_DEFAULT_FILE_NAME                "splash.bmp"
 
-static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr)
+static int splash_load_fs(struct splash_location *location, ulong bmp_load_addr)
 {
        int res = 0;
        loff_t bmp_size;
@@ -342,7 +342,7 @@ static struct splash_location *select_splash_location(
 }
 
 #ifdef CONFIG_FIT
-static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
+static int splash_load_fit(struct splash_location *location, ulong bmp_load_addr)
 {
        int res;
        int node_offset;
@@ -439,7 +439,7 @@ int splash_source_load(struct splash_location *locations, uint size)
        struct splash_location *splash_location;
        char *env_splashimage_value;
        char *devpart;
-       u32 bmp_load_addr;
+       ulong bmp_load_addr;
 
        env_splashimage_value = env_get("splashimage");
        if (env_splashimage_value == NULL)