#ifdef CONFIG_SPI_FLASH
static struct spi_flash *sf;
-static int splash_sf_read(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
{
if (!sf) {
sf = spi_flash_probe(CONFIG_SF_DEFAULT_BUS,
return spi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
}
#else
-static int splash_sf_read(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
{
debug("%s: sf support not available\n", __func__);
return -ENOSYS;
#endif
#ifdef CONFIG_CMD_NAND
-static int splash_nand_read(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
{
return nand_read_skip_bad(&nand_info[nand_curr_device], offset,
&read_size, NULL,
(u_char *)bmp_load_addr);
}
#else
-static int splash_nand_read(u32 bmp_load_addr, int offset, size_t read_size)
+static int splash_nand_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
{
debug("%s: nand support not available\n", __func__);
return -ENOSYS;
}
#endif
-static int splash_storage_read(struct splash_location *location,
+static int splash_storage_read_raw(struct splash_location *location,
u32 bmp_load_addr, size_t read_size)
{
u32 offset;
offset = location->offset;
switch (location->storage) {
case SPLASH_STORAGE_NAND:
- return splash_nand_read(bmp_load_addr, offset, read_size);
+ return splash_nand_read_raw(bmp_load_addr, offset, read_size);
case SPLASH_STORAGE_SF:
- return splash_sf_read(bmp_load_addr, offset, read_size);
+ return splash_sf_read_raw(bmp_load_addr, offset, read_size);
default:
printf("Unknown splash location\n");
}
if (bmp_load_addr + bmp_header_size >= gd->start_addr_sp)
goto splash_address_too_high;
- res = splash_storage_read(location, bmp_load_addr, bmp_header_size);
+ res = splash_storage_read_raw(location, bmp_load_addr, bmp_header_size);
if (res < 0)
return res;
if (bmp_load_addr + bmp_size >= gd->start_addr_sp)
goto splash_address_too_high;
- return splash_storage_read(location, bmp_load_addr, bmp_size);
+ return splash_storage_read_raw(location, bmp_load_addr, bmp_size);
splash_address_too_high:
printf("Error: splashimage address too high. Data overwrites U-Boot and/or placed beyond DRAM boundaries.\n");