summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2015-10-29 11:54:43 +0200
committerStefano Babic <sbabic@denx.de>2015-11-16 12:01:35 +0100
commit50c2d2e120f10042d2241353b4e0d564fc5c3260 (patch)
tree58897b8bcf4afffbd4ee94f134d3876bba8f0b7e /common
parent9bb4e9474281806986bc1c07f5f4b0ecc33d1bae (diff)
downloadu-boot-imx-50c2d2e120f10042d2241353b4e0d564fc5c3260.zip
u-boot-imx-50c2d2e120f10042d2241353b4e0d564fc5c3260.tar.gz
u-boot-imx-50c2d2e120f10042d2241353b4e0d564fc5c3260.tar.bz2
splash_source: add support for filesystem formatted sata
Add support for loading splashimage from filesystem formatted sata storage. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Diffstat (limited to 'common')
-rw-r--r--common/splash_source.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/common/splash_source.c b/common/splash_source.c
index cf47569..a09dd4b 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -13,6 +13,7 @@
#include <spi_flash.h>
#include <spi.h>
#include <usb.h>
+#include <sata.h>
#include <bmp_layout.h>
#include <fs.h>
@@ -116,6 +117,9 @@ static int splash_select_fs_dev(struct splash_location *location)
case SPLASH_STORAGE_USB:
res = fs_set_blk_dev("usb", location->devpart, FS_TYPE_ANY);
break;
+ case SPLASH_STORAGE_SATA:
+ res = fs_set_blk_dev("sata", location->devpart, FS_TYPE_ANY);
+ break;
default:
printf("Error: unsupported location storage.\n");
return -ENODEV;
@@ -146,6 +150,19 @@ static inline int splash_init_usb(void)
}
#endif
+#ifdef CONFIG_CMD_SATA
+static int splash_init_sata(void)
+{
+ return sata_initialize();
+}
+#else
+static inline int splash_init_sata(void)
+{
+ printf("Cannot load splash image: no SATA support\n");
+ return -ENOSYS;
+}
+#endif
+
#define SPLASH_SOURCE_DEFAULT_FILE_NAME "splash.bmp"
static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr)
@@ -161,6 +178,9 @@ static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr)
if (location->storage == SPLASH_STORAGE_USB)
res = splash_init_usb();
+ if (location->storage == SPLASH_STORAGE_SATA)
+ res = splash_init_sata();
+
if (res)
return res;