usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE
authorAbel Vesa <abel.vesa@nxp.com>
Fri, 1 Feb 2019 16:40:07 +0000 (16:40 +0000)
committerStefano Babic <sbabic@denx.de>
Fri, 15 Feb 2019 21:01:15 +0000 (22:01 +0100)
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>
arch/arm/include/asm/arch-am33xx/spl.h
arch/arm/mach-omap2/boot-common.c
common/Makefile
common/spl/Kconfig
common/spl/Makefile
common/spl/spl_usb.c
configs/am43xx_evm_usbhost_boot_defconfig
configs/am43xx_hs_evm_defconfig

index 0bf8c17ff415d7bb8d0e5110a9197e7c59780f63..f3910c2123a0963ca0e582f39786acd72d7a5afd 100644 (file)
@@ -62,7 +62,7 @@
 #define BOOT_DEVICE_CPGMAC     0x47
 
 #define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
-#ifdef CONFIG_SPL_USB_SUPPORT
+#ifdef CONFIG_SPL_USB_STORAGE
 #define MMC_BOOT_DEVICES_END   BOOT_DEVICE_USB
 #else
 #define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
index 2db19227b92104c72b166c4bed73ca595275880b..c8b8ac657fbff3abed5a5d1ad9be851ed97076db 100644 (file)
@@ -93,7 +93,7 @@ void save_omap_boot_params(void)
                        sys_boot_device = 1;
                        break;
 #endif
-#if defined(BOOT_DEVICE_USB) && !defined(CONFIG_SPL_USB_SUPPORT)
+#if defined(BOOT_DEVICE_USB) && !defined(CONFIG_SPL_USB_STORAGE)
                case BOOT_DEVICE_USB:
                        sys_boot_device = 1;
                        break;
index ad390d083ac7c23a70d8c5d8e58cca1bba67b983..8c92feb39991b997aabe95de035d3ae64243a7a0 100644 (file)
@@ -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
index 935066d66487f820b9b2f1ef54bda4f10d576d3f..85edd5a61f83ffb4dfb6959e348108e621dc79e1 100644 (file)
@@ -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.
index e1daabf1e9c00ca2fc4e28760abb2f5a35f2f927..d28de692dd6a017becc30503d8bace714a6dda20 100644 (file)
@@ -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
index c8d82318957940ec7d97155fdd66acdde6aefab5..e29d579b0d43ff77c0eba8bd4987cd5a69a928de 100644 (file)
@@ -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");
 
index 5131f190a70d880ef64e82433e1db7f55100dfec..5bd919bdf172344d67c2b1747cb1b4eee3979354 100644 (file)
@@ -14,7 +14,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_SUPPORT=y
+CONFIG_SPL_USB_STORAGE=y
 CONFIG_CMD_SPL=y
 CONFIG_CMD_SPL_NAND_OFS=0x00100000
 CONFIG_CMD_SPL_WRITE_SIZE=0x40000
index 99e4ccb59208923802ec089b54330ce1588632ea..c01fda9cce0e20f696b0e0256d3d09d4f95f3853 100644 (file)
@@ -24,7 +24,7 @@ CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SPL_NET_SUPPORT=y
 CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL"
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_SUPPORT=y
+CONFIG_SPL_USB_STORAGE=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
 # CONFIG_CMD_FLASH is not set