summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAbel Vesa <abel.vesa@nxp.com>2019-02-01 16:40:07 +0000
committerStefano Babic <sbabic@denx.de>2019-02-15 22:01:15 +0100
commit79536013a3c5d451b7209ad66eb16b3b5b64bbaf (patch)
tree08e412e49af44a5f5f4b9d5653eda828245d15dc /common
parent69280961d72754f27b5196d392bd41b7f8fa2a42 (diff)
downloadu-boot-79536013a3c5d451b7209ad66eb16b3b5b64bbaf.tar.gz
u-boot-79536013a3c5d451b7209ad66eb16b3b5b64bbaf.tar.xz
u-boot-79536013a3c5d451b7209ad66eb16b3b5b64bbaf.zip
usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE
Since there is the SPL_USB_HOST_SUPPORT for enabling USB support in SPL, makes more sense to rename the SPL_USB_SUPPORT as SPL_USB_STORAGE. Everything that is not part of the usb storage support in SPL is now build under SPL_USB_HOST_SUPPORT. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/Makefile5
-rw-r--r--common/spl/Kconfig4
-rw-r--r--common/spl/Makefile2
-rw-r--r--common/spl/spl_usb.c4
4 files changed, 6 insertions, 9 deletions
diff --git a/common/Makefile b/common/Makefile
index ad390d083a..8c92feb399 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -75,8 +75,9 @@ obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
ifdef CONFIG_SPL_USB_HOST_SUPPORT
-obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
-obj-$(CONFIG_USB_STORAGE) += usb_storage.o
+obj-y += usb.o
+obj-y += usb_hub.o
+obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o
else
obj-$(CONFIG_USB_MUSB_HOST) += usb.o
endif
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 935066d664..85edd5a61f 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -794,9 +794,9 @@ config SPL_USB_HOST_SUPPORT
device can be attached. This option enables the drivers in
drivers/usb/host as part of an SPL build.
-config SPL_USB_SUPPORT
+config SPL_USB_STORAGE
bool "Support loading from USB"
- depends on SPL_USB_HOST_SUPPORT
+ depends on SPL_USB_HOST_SUPPORT && !(BLK && !DM_USB)
help
Enable support for USB devices in SPL. This allows use of USB
devices such as hard drives and flash drivers for loading U-Boot.
diff --git a/common/spl/Makefile b/common/spl/Makefile
index e1daabf1e9..d28de692dd 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -22,7 +22,7 @@ obj-$(CONFIG_$(SPL_TPL_)NET_SUPPORT) += spl_net.o
obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += spl_mmc.o
obj-$(CONFIG_$(SPL_TPL_)ATF) += spl_atf.o
obj-$(CONFIG_$(SPL_TPL_)OPTEE) += spl_optee.o
-obj-$(CONFIG_$(SPL_TPL_)USB_SUPPORT) += spl_usb.o
+obj-$(CONFIG_$(SPL_TPL_)USB_STORAGE) += spl_usb.o
obj-$(CONFIG_$(SPL_TPL_)FS_FAT) += spl_fat.o
obj-$(CONFIG_$(SPL_TPL_)FS_EXT4) += spl_ext.o
obj-$(CONFIG_$(SPL_TPL_)SATA_SUPPORT) += spl_sata.o
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index c8d8231895..e29d579b0d 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -15,9 +15,7 @@
#include <usb.h>
#include <fat.h>
-#ifdef CONFIG_USB_STORAGE
static int usb_stor_curr_dev = -1; /* current device */
-#endif
static int spl_usb_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
@@ -34,13 +32,11 @@ static int spl_usb_load_image(struct spl_image_info *spl_image,
return err;
}
-#ifdef CONFIG_USB_STORAGE
/* try to recognize storage devices immediately */
usb_stor_curr_dev = usb_stor_scan(1);
stor_dev = blk_get_devnum_by_type(IF_TYPE_USB, usb_stor_curr_dev);
if (!stor_dev)
return -ENODEV;
-#endif
debug("boot mode - FAT\n");