Convert CONFIG_SYS_NONCACHED_MEMORY to Kconfig
authorTom Rini <trini@konsulko.com>
Sat, 29 Oct 2022 00:27:10 +0000 (20:27 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 10 Nov 2022 15:08:55 +0000 (10:08 -0500)
This converts the following to Kconfig:
   CONFIG_SYS_NONCACHED_MEMORY

To do this we introduce CONFIG_SYS_HAS_NONCACHED_MEMORY as a bool to
gate if we are going to have noncached_... functions available and then
continue to use CONFIG_SYS_NONCACHED_MEMORY to store the size of said
cache. We make this new option depend on both the architectures which
implement support and the drivers which make use of it.

Cc: Tom Warren <twarren@nvidia.com>
Cc: Mingming lee <mingming.lee@mediatek.com>
Cc: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
Cc: Alban Bedel <alban.bedel@avionic-design.de>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
54 files changed:
README
arch/Kconfig
configs/apalis-tk1_defconfig
configs/apalis_t30_defconfig
configs/beaver_defconfig
configs/cardhu_defconfig
configs/cei-tk1-som_defconfig
configs/colibri_t20_defconfig
configs/colibri_t30_defconfig
configs/dalmore_defconfig
configs/harmony_defconfig
configs/imx8mp_rsb3720a1_4G_defconfig
configs/imx8mp_rsb3720a1_6G_defconfig
configs/jetson-tk1_defconfig
configs/medcom-wide_defconfig
configs/mt7621_nand_rfb_defconfig
configs/mt7621_rfb_defconfig
configs/mt7622_rfb_defconfig
configs/mt7623a_unielec_u7623_02_defconfig
configs/mt7623n_bpir2_defconfig
configs/mt7629_rfb_defconfig
configs/mt7981_emmc_rfb_defconfig
configs/mt7981_rfb_defconfig
configs/mt7981_sd_rfb_defconfig
configs/mt7986_rfb_defconfig
configs/mt7986a_bpir3_emmc_defconfig
configs/mt7986a_bpir3_sd_defconfig
configs/mt8512_bm1_emmc_defconfig
configs/mt8518_ap1_emmc_defconfig
configs/nyan-big_defconfig
configs/p2371-0000_defconfig
configs/p2371-2180_defconfig
configs/p2571_defconfig
configs/p2771-0000-000_defconfig
configs/p2771-0000-500_defconfig
configs/p3450-0000_defconfig
configs/paz00_defconfig
configs/plutux_defconfig
configs/seaboard_defconfig
configs/tec-ng_defconfig
configs/tec_defconfig
configs/trimslice_defconfig
configs/venice2_defconfig
configs/ventana_defconfig
include/configs/imx8mp_rsb3720.h
include/configs/mt7621.h
include/configs/mt7622.h
include/configs/mt7623.h
include/configs/mt7629.h
include/configs/mt7981.h
include/configs/mt7986.h
include/configs/mt8512.h
include/configs/mt8518.h
include/configs/tegra-common-post.h

diff --git a/README b/README
index 351c039..389943d 100644 (file)
--- a/README
+++ b/README
@@ -1473,25 +1473,6 @@ Configuration Settings:
                boards which do not use the full malloc in SPL (which is
                enabled with CONFIG_SYS_SPL_MALLOC).
 
-- CONFIG_SYS_NONCACHED_MEMORY:
-               Size of non-cached memory area. This area of memory will be
-               typically located right below the malloc() area and mapped
-               uncached in the MMU. This is useful for drivers that would
-               otherwise require a lot of explicit cache maintenance. For
-               some drivers it's also impossible to properly maintain the
-               cache. For example if the regions that need to be flushed
-               are not a multiple of the cache-line size, *and* padding
-               cannot be allocated between the regions to align them (i.e.
-               if the HW requires a contiguous array of regions, and the
-               size of each region is not cache-aligned), then a flush of
-               one region may result in overwriting data that hardware has
-               written to another region in the same cache-line. This can
-               happen for example in network drivers where descriptors for
-               buffers are typically smaller than the CPU cache-line (e.g.
-               16 bytes vs. 32 or 64 bytes).
-
-               Non-cached memory is only supported on 32-bit ARM at present.
-
 - CONFIG_SYS_BOOTMAPSZ:
                Maximum size of memory mapped by the startup code of
                the Linux kernel; all data that must be processed by
index e3a456a..ae39716 100644 (file)
@@ -438,6 +438,30 @@ config TPL_SKIP_LOWLEVEL_INIT_ONLY
          normal CP15 init (such as enabling the instruction cache) is still
          performed.
 
+config SYS_HAS_NONCACHED_MEMORY
+       bool "Enable reserving a non-cached memory area for drivers"
+       depends on (ARM || MIPS) && (RTL8169 || MEDIATEK_ETH)
+       help
+         This is useful for drivers that would otherwise require a lot of
+         explicit cache maintenance. For some drivers it's also impossible to
+         properly maintain the cache. For example if the regions that need to
+         be flushed are not a multiple of the cache-line size, *and* padding
+         cannot be allocated between the regions to align them (i.e.  if the
+         HW requires a contiguous array of regions, and the size of each
+         region is not cache-aligned), then a flush of one region may result
+         in overwriting data that hardware has written to another region in
+         the same cache-line. This can happen for example in network drivers
+         where descriptors for buffers are typically smaller than the CPU
+         cache-line (e.g.  16 bytes vs. 32 or 64 bytes).
+
+config SYS_NONCACHED_MEMORY
+       hex "Size in bytes of the non-cached memory area"
+       depends on SYS_HAS_NONCACHED_MEMORY
+       default 0x100000
+       help
+         Size of non-cached memory area. This area of memory will be typically
+         located right below the malloc() area and mapped uncached in the MMU.
+
 source "arch/arc/Kconfig"
 source "arch/arm/Kconfig"
 source "arch/m68k/Kconfig"
index 70ef62a..6c27901 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 587af46..b50665b 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 24f619c..0967367 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 87aa930..9bfa759 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index f716f62..58d75a5 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 224de94..95fef40 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index a616eae..a69acd9 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index cc46f4e..ea8bc8a 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 353d1a3..5a3c509 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index 5e29320..48436ff 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_TEXT_BASE=0x40200000
 CONFIG_SYS_MALLOC_LEN=0x2000000
index 11c3e1f..3cba4e2 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_TEXT_BASE=0x40200000
 CONFIG_SYS_MALLOC_LEN=0x2000000
index 1187974..b391a86 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 76e4eb3..cb5324b 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index ee30f48..5291bb3 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_MIPS=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_MALLOC_LEN=0x100000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
index 9987cc5..70280ad 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_MIPS=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_MALLOC_LEN=0x100000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
index a0d33c0..3f18add 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x41e00000
index 82397b2..c56b4bb 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x81e00000
index 34960c0..e36943b 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x81e00000
index b5dbbea..d7669d5 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_ARCH_TIMER=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MEDIATEK=y
index 557c8e7..4832a22 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x41e00000
index f9776ff..c397527 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x41e00000
index 5e0c8c8..17592dc 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x41e00000
index e3ded76..1363f9d 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x41e00000
index 6d29885..354159d 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x41e00000
index 222987a..db7ef98 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_TEXT_BASE=0x41e00000
index 772306c..888da16 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=13000000
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
index d75e299..43c166d 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=13000000
 CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ARCH_MEDIATEK=y
index e2e8beb..b140ec8 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x81000100
index e807491..6ffe922 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80080000
index ca630a4..ea62e18 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
index bc3fb3e..fb1cc68 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80080000
index 8b1d2b2..682be7d 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
index 4a2f622..c5925b1 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
index 0160546..8e16afd 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_COUNTER_FREQUENCY=19200000
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
index 558375d..135e740 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index 170ac86..0fe41c1 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index 686a3c0..40d8836 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index 02d6b49..1caac5a 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 967d305..852d73e 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index a9f774c..5da3a27 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index a754c20..226480b 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x80110000
index 3c924ec..7a5e47b 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_ARCH_TEGRA=y
 CONFIG_TEXT_BASE=0x00110000
index b8abdb0..5caabf2 100644 (file)
 #if defined(CONFIG_CMD_NET)
 #define CONFIG_FEC_MXC_PHYADDR          4
 
-#ifdef CONFIG_DWC_ETH_QOS
-#define CONFIG_SYS_NONCACHED_MEMORY     (1 * SZ_1M)     /* 1M */
-#endif
-
 #define PHY_ANEG_TIMEOUT 20000
 
 #endif
index 6a55e7a..9b1ba36 100644 (file)
@@ -15,8 +15,6 @@
 
 #define CONFIG_SYS_INIT_SP_OFFSET      0x800000
 
-#define CONFIG_SYS_NONCACHED_MEMORY    0x100000
-
 /* MMC */
 #define MMC_SUPPORTS_TUNING
 
index f995399..fd8e30a 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef __MT7622_H
 #define __MT7622_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY    SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_BASE                   CONFIG_TEXT_BASE
 
index 0cd8b08..73093f9 100644 (file)
@@ -13,8 +13,6 @@
 
 /* Miscellaneous configurable options */
 
-#define CONFIG_SYS_NONCACHED_MEMORY    SZ_1M
-
 /* Environment */
 
 /* Preloader -> Uboot */
index 22d11d0..668dc3c 100644 (file)
@@ -13,8 +13,6 @@
 
 /* Miscellaneous configurable options */
 
-#define CONFIG_SYS_NONCACHED_MEMORY    SZ_1M
-
 /* Environment */
 
 /* Defines for SPL */
index 1f81b0b..9f26b0b 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef __MT7981_H
 #define __MT7981_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY    SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_BASE          CONFIG_TEXT_BASE
 
index 00e1c57..4fbd57a 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef __MT7986_H
 #define __MT7986_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY    SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_BASE          CONFIG_TEXT_BASE
 
index 5ff5541..d159416 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef __MT8512_H
 #define __MT8512_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY            SZ_1M
-
 /* Uboot definition */
 #define CONFIG_SYS_UBOOT_START                 CONFIG_TEXT_BASE
 
index 6d47046..7cabbef 100644 (file)
@@ -9,11 +9,6 @@
 #ifndef __MT8518_H
 #define __MT8518_H
 
-#include <linux/sizes.h>
-
-#define CONFIG_SYS_NONCACHED_MEMORY            SZ_1M
-
-
 /* DRAM definition */
 #define CONFIG_SYS_SDRAM_BASE                  0x40000000
 #define CONFIG_SYS_SDRAM_SIZE                  0x20000000
index 4e20e1d..69acabf 100644 (file)
@@ -7,8 +7,6 @@
 #ifndef __TEGRA_COMMON_POST_H
 #define __TEGRA_COMMON_POST_H
 
-#define CONFIG_SYS_NONCACHED_MEMORY    (1 << 20)       /* 1 MiB */
-
 #if CONFIG_IS_ENABLED(CMD_USB)
 # define BOOT_TARGET_USB(func) func(USB, usb, 0)
 #else