Convert CONFIG_CMD_THOR_DOWNLOAD to Kconfig

This converts the following to Kconfig:
   CONFIG_CMD_THOR_DOWNLOAD

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 4d7516e..3dfc94a 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -304,6 +304,14 @@
 	  flash used by Falcon-mode boot. See the documentation until CMD_SPL
 	  for detail.
 
+config CMD_THOR_DOWNLOAD
+	bool "thor - TIZEN 'thor' download"
+	help
+	  Implements the 'thor' download protocol. This is a way of
+	  downloading a software update over USB from an attached host.
+	  There is no documentation about this within the U-Boot source code
+	  but you should be able to find something on the interwebs.
+
 endmenu
 
 menu "Environment commands"
diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index ffcecd5..2354a00 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -12,6 +12,7 @@
 CONFIG_CONSOLE_MUX=y
 CONFIG_SYS_PROMPT="ODROID-XU3 # "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig
index 22e86e2..c9e5540 100644
--- a/configs/odroid_defconfig
+++ b/configs/odroid_defconfig
@@ -13,6 +13,7 @@
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
diff --git a/configs/origen_defconfig b/configs/origen_defconfig
index 573c9e2..0a27833 100644
--- a/configs/origen_defconfig
+++ b/configs/origen_defconfig
@@ -12,6 +12,7 @@
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
diff --git a/configs/s5p_goni_defconfig b/configs/s5p_goni_defconfig
index 0045f5e..8bfab75 100644
--- a/configs/s5p_goni_defconfig
+++ b/configs/s5p_goni_defconfig
@@ -9,6 +9,7 @@
 # CONFIG_AUTOBOOT is not set
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig
index 021e6c5..cdbf12c 100644
--- a/configs/s5pc210_universal_defconfig
+++ b/configs/s5pc210_universal_defconfig
@@ -10,6 +10,7 @@
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
diff --git a/configs/topic_miami_defconfig b/configs/topic_miami_defconfig
index 1873791..1bc9e38 100644
--- a/configs/topic_miami_defconfig
+++ b/configs/topic_miami_defconfig
@@ -13,6 +13,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="zynq-uboot> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/topic_miamilite_defconfig b/configs/topic_miamilite_defconfig
index db859a7..df36b68 100644
--- a/configs/topic_miamilite_defconfig
+++ b/configs/topic_miamilite_defconfig
@@ -13,6 +13,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="zynq-uboot> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/topic_miamiplus_defconfig b/configs/topic_miamiplus_defconfig
index 93e0292..18df89d 100644
--- a/configs/topic_miamiplus_defconfig
+++ b/configs/topic_miamiplus_defconfig
@@ -13,6 +13,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="zynq-uboot> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig
index 16ac27f..f91ec1d 100644
--- a/configs/trats2_defconfig
+++ b/configs/trats2_defconfig
@@ -13,6 +13,7 @@
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
diff --git a/configs/trats_defconfig b/configs/trats_defconfig
index 0f2445b..3a8f075 100644
--- a/configs/trats_defconfig
+++ b/configs/trats_defconfig
@@ -12,6 +12,7 @@
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
diff --git a/configs/xilinx_zynqmp_ep_defconfig b/configs/xilinx_zynqmp_ep_defconfig
index 1d5fd1f..b863c1a 100644
--- a/configs/xilinx_zynqmp_ep_defconfig
+++ b/configs/xilinx_zynqmp_ep_defconfig
@@ -21,6 +21,7 @@
 # CONFIG_CMD_CONSOLE is not set
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_EDITENV is not set
 # CONFIG_CMD_ENV_EXISTS is not set
 CONFIG_CMD_UNZIP=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig b/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig
index dacdee3..cceba36 100644
--- a/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig
@@ -20,6 +20,7 @@
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_UNZIP=y
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
index 14dc5ba..6b195b7 100644
--- a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
@@ -21,6 +21,7 @@
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_UNZIP=y
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/xilinx_zynqmp_zcu102_revA_defconfig b/configs/xilinx_zynqmp_zcu102_revA_defconfig
index c52b583..910cd1e 100644
--- a/configs/xilinx_zynqmp_zcu102_revA_defconfig
+++ b/configs/xilinx_zynqmp_zcu102_revA_defconfig
@@ -20,6 +20,7 @@
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_UNZIP=y
diff --git a/configs/xilinx_zynqmp_zcu102_revB_defconfig b/configs/xilinx_zynqmp_zcu102_revB_defconfig
index 7ed0116..fa60d28 100644
--- a/configs/xilinx_zynqmp_zcu102_revB_defconfig
+++ b/configs/xilinx_zynqmp_zcu102_revB_defconfig
@@ -20,6 +20,7 @@
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_UNZIP=y
diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
index ec8eafb..1eb6575 100644
--- a/configs/zynq_microzed_defconfig
+++ b/configs/zynq_microzed_defconfig
@@ -12,6 +12,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/zynq_picozed_defconfig b/configs/zynq_picozed_defconfig
index f5155b2..ad6bc0b 100644
--- a/configs/zynq_picozed_defconfig
+++ b/configs/zynq_picozed_defconfig
@@ -9,6 +9,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
diff --git a/configs/zynq_z_turn_defconfig b/configs/zynq_z_turn_defconfig
index b550912..505c4de 100644
--- a/configs/zynq_z_turn_defconfig
+++ b/configs/zynq_z_turn_defconfig
@@ -13,6 +13,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
index b850af9..d6a32f9 100644
--- a/configs/zynq_zc702_defconfig
+++ b/configs/zynq_zc702_defconfig
@@ -14,6 +14,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_EEPROM=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
index 35722e9..5616549 100644
--- a/configs/zynq_zc706_defconfig
+++ b/configs/zynq_zc706_defconfig
@@ -13,6 +13,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_EEPROM=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
index 762d475..9ebcd41 100644
--- a/configs/zynq_zed_defconfig
+++ b/configs/zynq_zed_defconfig
@@ -12,6 +12,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index 4392361..31499a1 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -14,6 +14,7 @@
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_THOR_DOWNLOAD=y
 CONFIG_CMD_EEPROM=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
diff --git a/include/configs/exynos4-common.h b/include/configs/exynos4-common.h
index 9f0131a..94fd3b3 100644
--- a/include/configs/exynos4-common.h
+++ b/include/configs/exynos4-common.h
@@ -21,7 +21,6 @@
 #define CONFIG_MMC_DEFAULT_DEV	0
 
 /* TIZEN THOR downloader support */
-#define CONFIG_CMD_THOR_DOWNLOAD
 #define CONFIG_USB_FUNCTION_THOR
 
 #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index 697f8d2..8bc7fbd 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -48,7 +48,6 @@
 #define CONFIG_G_DNL_THOR_VENDOR_NUM	CONFIG_G_DNL_VENDOR_NUM
 #define CONFIG_G_DNL_THOR_PRODUCT_NUM	0x685D
 #define CONFIG_USB_FUNCTION_THOR
-#define CONFIG_CMD_THOR_DOWNLOAD
 
 /* UMS */
 #define CONFIG_G_DNL_UMS_VENDOR_NUM	0x0525
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index eb17580..01655ee 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -56,7 +56,6 @@
 #define DFU_DEFAULT_POLL_TIMEOUT 300
 
 /* TIZEN THOR downloader support */
-#define CONFIG_CMD_THOR_DOWNLOAD
 #define CONFIG_USB_FUNCTION_THOR
 
 /* USB Samsung's IDs */
diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h
index 9986a3b..96048f5 100644
--- a/include/configs/smdkv310.h
+++ b/include/configs/smdkv310.h
@@ -15,7 +15,6 @@
 #undef CONFIG_USB_GADGET_DWC2_OTG
 #undef CONFIG_USB_GADGET_DWC2_OTG_PHY
 #undef CONFIG_REVISION_TAG
-#undef CONFIG_CMD_THOR_DOWNLOAD
 
 /* High Level Configuration Options */
 #define CONFIG_EXYNOS4210		1	/* which is a EXYNOS4210 SoC */
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 77d7899..6dcc8e5 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -89,7 +89,6 @@
 #define CONFIG_SYS_DFU_DATA_BUF_SIZE	0x1800000
 #define DFU_DEFAULT_POLL_TIMEOUT	300
 #define CONFIG_USB_CABLE_CHECK
-#define CONFIG_CMD_THOR_DOWNLOAD
 #define CONFIG_USB_FUNCTION_THOR
 #define CONFIG_THOR_RESET_OFF
 #define DFU_ALT_INFO_RAM \
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 35e5c1e..66bc508 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -91,7 +91,6 @@
 # define CONFIG_SYS_DFU_DATA_BUF_SIZE	0x600000
 # define DFU_DEFAULT_POLL_TIMEOUT	300
 # define CONFIG_USB_CABLE_CHECK
-# define CONFIG_CMD_THOR_DOWNLOAD
 # define CONFIG_THOR_RESET_OFF
 # define CONFIG_USB_FUNCTION_THOR
 # define DFU_ALT_INFO_RAM \
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 1881fff..0621e7b 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -293,7 +293,6 @@
 CONFIG_CMDLINE_EDITING
 CONFIG_CMDLINE_PS_SUPPORT
 CONFIG_CMDLINE_TAG
-CONFIG_CMD_THOR_DOWNLOAD
 CONFIG_CMD_TRACE
 CONFIG_CMD_TSI148
 CONFIG_CMD_UNIVERSE