diff options
author | Tom Rini <trini@konsulko.com> | 2022-01-10 14:01:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-10 14:01:57 -0500 |
commit | fe04d885fb540b614a2f989e16e808b300ccb52e (patch) | |
tree | 613d413c36bda908658fe4c6a24fb1a61de716ce /common/splash_source.c | |
parent | d637294e264adfeb29f390dfc393106fd4d41b17 (diff) | |
parent | 0dadad6d7c5769d6258baeaf1b8db843b0dfa01f (diff) |
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/splash_source.c')
-rw-r--r-- | common/splash_source.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/splash_source.c b/common/splash_source.c index d05670f5ee..2c03cbdf92 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -20,6 +20,7 @@ #include <spi_flash.h> #include <splash.h> #include <usb.h> +#include <virtio.h> #include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; @@ -179,6 +180,16 @@ static inline int splash_init_sata(void) } #endif +static int splash_init_virtio(void) +{ + if (!IS_ENABLED(CONFIG_VIRTIO)) { + printf("Cannot load splash image: no virtio support\n"); + return -ENOSYS; + } else { + return virtio_init(); + } +} + #ifdef CONFIG_CMD_UBIFS static int splash_mount_ubifs(struct splash_location *location) { @@ -233,6 +244,9 @@ static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr) if (location->storage == SPLASH_STORAGE_SATA) res = splash_init_sata(); + if (location->storage == SPLASH_STORAGE_VIRTIO) + res = splash_init_virtio(); + if (location->ubivol != NULL) res = splash_mount_ubifs(location); |