[U-Boot] [PATCH] splash: Accommodate DM_USB in splash_init_usb()

Alexey Brodkin Alexey.Brodkin at synopsys.com
Fri Jul 1 21:47:36 CEST 2016


Current implementation of splash_init_usb() requires usb_stor_scan()
which doesn't exist in case of DM_USB simply because real probing
happens right in usb_init().

So disable usage of usb_stor_scan() in case of DM_USB.

Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
Cc: Nikita Kiryanov <nikita at compulab.co.il>
Cc: Simon Glass <sjg at chromium.org>
Cc: Jeroen Hofstee <jeroen at myspectrum.nl>
Cc: Anatolij Gustschin <agust at denx.de>
Cc: Robert Winkler <robert.winkler at boundarydevices.com>
---
 common/splash_source.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/common/splash_source.c b/common/splash_source.c
index 914f12f..230b2db 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -146,7 +146,11 @@ static int splash_init_usb(void)
 	if (err)
 		return err;
 
-	return usb_stor_scan(1) < 0 ? -ENODEV : 0;
+#ifndef CONFIG_DM_USB
+	err = usb_stor_scan(1) < 0 ? -ENODEV : 0;
+#endif
+
+	return err;
 }
 #else
 static inline int splash_init_usb(void)
-- 
2.5.5



More information about the U-Boot mailing list