[U-Boot] [PATCH 1/5] splash_source: rename *_read() to *_read_raw()

Nikita Kiryanov
2015-08-30T08:42:32Z

Rename raw read functions to *_read_raw() in preparation for supporting
read_fs() feature.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
common/splash_source.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/common/splash_source.c b/common/splash_source.c
index d1bb5a4..4820c12 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -18,7 +18,7 @@ DECLARE_GLOBAL_DATA_PTR;

#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,
@@ -32,7 +32,7 @@ static int splash_sf_read(u32 bmp_load_addr, int offset, size_t read_size)
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;
@@ -40,7 +40,7 @@ static int splash_sf_read(u32 bmp_load_addr, int offset, size_t read_size)
#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,
@@ -48,14 +48,14 @@ static int splash_nand_read(u32 bmp_load_addr, int offset, size_t read_size)
(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;
@@ -66,9 +66,9 @@ static int splash_storage_read(struct splash_location *location,
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");
}
@@ -85,7 +85,7 @@ static int splash_load_raw(struct splash_location *location, u32 bmp_load_addr)
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;

@@ -95,7 +95,7 @@ static int splash_load_raw(struct splash_location *location, u32 bmp_load_addr)
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");
--
1.9.1