From 6828e602b722d1137d17ca0d25a451c7743c2770 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 19 Sep 2016 13:31:30 -0400 Subject: dfu: Migrate to Kconfig Introduce a hidden USB_FUNCTION_DFU Kconfig option and select it for CMD_DFU (as we must have the DFU command enabled to do anything DFU). Make all of the entries in drivers/dfu/Kconfig depend on CMD_DFU and add options for all of the back end choices that DFU can make use of. Cc: Lukasz Majewski Signed-off-by: Tom Rini Acked-by: Lukasz Majewski --- include/configs/am335x_evm.h | 4 ---- include/configs/am43xx_evm.h | 5 ----- include/configs/bav335x.h | 4 ---- include/configs/cgtqmx6eval.h | 5 ----- include/configs/colibri_imx7.h | 2 -- include/configs/colibri_vf.h | 3 --- include/configs/corvus.h | 2 -- include/configs/dra7xx_evm.h | 8 -------- include/configs/exynos4-common.h | 2 -- include/configs/mx6sabre_common.h | 5 ----- include/configs/mx7dsabresd.h | 5 ----- include/configs/odroid_xu3.h | 2 -- include/configs/omap5_uevm.h | 6 ------ include/configs/pico-imx6ul.h | 2 -- include/configs/s5p_goni.h | 2 -- include/configs/siemens-am33x-common.h | 2 -- include/configs/smartweb.h | 2 -- include/configs/socfpga_common.h | 4 ---- include/configs/socfpga_vining_fpga.h | 4 ---- include/configs/sunxi-common.h | 5 ----- include/configs/taurus.h | 2 -- include/configs/tegra-common-usb-gadget.h | 8 -------- include/configs/warp.h | 2 -- include/configs/warp7.h | 2 -- include/configs/xilinx_zynqmp.h | 2 -- include/configs/zynq-common.h | 3 --- 26 files changed, 93 deletions(-) (limited to 'include/configs') diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 6b5ed48..2959bef 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -332,8 +332,6 @@ /* USB Device Firmware Update support */ #ifndef CONFIG_SPL_BUILD -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define DFU_ALT_INFO_MMC \ "dfu_alt_info_mmc=" \ "boot part 0 1;" \ @@ -348,7 +346,6 @@ "u-boot.img fat 0 1;" \ "uEnv.txt fat 0 1\0" #ifdef CONFIG_NAND -#define CONFIG_DFU_NAND #define DFU_ALT_INFO_NAND \ "dfu_alt_info_nand=" \ "SPL part 0 1;" \ @@ -362,7 +359,6 @@ #else #define DFU_ALT_INFO_NAND "" #endif -#define CONFIG_DFU_RAM #define DFU_ALT_INFO_RAM \ "dfu_alt_info_ram=" \ "kernel ram 0x80200000 0xD80000;" \ diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 19ccbcb..20f207c 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -122,10 +122,7 @@ #ifndef CONFIG_SPL_BUILD /* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_RAM -#define CONFIG_DFU_MMC #define DFU_ALT_INFO_MMC \ "dfu_alt_info_mmc=" \ "boot part 0 1;" \ @@ -141,14 +138,12 @@ "MLO raw 0x100 0x100 mmcpart 0;" \ "u-boot.img raw 0x300 0x1000 mmcpart 0\0" -#define CONFIG_DFU_RAM #define DFU_ALT_INFO_RAM \ "dfu_alt_info_ram=" \ "kernel ram 0x80200000 0x4000000;" \ "fdt ram 0x80f80000 0x80000;" \ "ramdisk ram 0x81000000 0x4000000\0" -#define CONFIG_DFU_SF #define DFU_ALT_INFO_QSPI \ "dfu_alt_info_qspi=" \ "u-boot.bin raw 0x0 0x080000;" \ diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h index 82d82f4..0eb0c03 100644 --- a/include/configs/bav335x.h +++ b/include/configs/bav335x.h @@ -465,8 +465,6 @@ DEFAULT_LINUX_BOOT_ENV \ /* USB Device Firmware Update support */ #ifndef CONFIG_SPL_BUILD -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define DFU_ALT_INFO_MMC \ "dfu_alt_info_mmc=" \ "boot part 0 1;" \ @@ -481,7 +479,6 @@ DEFAULT_LINUX_BOOT_ENV \ "u-boot.img fat 0 1;" \ "uEnv.txt fat 0 1\0" #ifdef CONFIG_NAND -#define CONFIG_DFU_NAND #define DFU_ALT_INFO_NAND \ "dfu_alt_info_nand=" \ "SPL part 0 1;" \ @@ -495,7 +492,6 @@ DEFAULT_LINUX_BOOT_ENV \ #else #define DFU_ALT_INFO_NAND "" #endif -#define CONFIG_DFU_RAM #define DFU_ALT_INFO_RAM \ "dfu_alt_info_ram=" \ "kernel ram 0x80200000 0xD80000;" \ diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index 36a29f1..5ee83de 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -81,11 +81,6 @@ #define CONFIG_USB_FUNCTION_MASS_STORAGE -/* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC -#define CONFIG_DFU_SF - #define CONFIG_USB_FUNCTION_FASTBOOT #define CONFIG_CMD_FASTBOOT #define CONFIG_ANDROID_BOOT_IMAGE diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index ba1adea..e911303 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -220,8 +220,6 @@ #define CONFIG_USB_FUNCTION_MASS_STORAGE /* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M #define DFU_DEFAULT_POLL_TIMEOUT 300 diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index 0ee08e6..597eb2c 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -216,9 +216,6 @@ #define CONFIG_TRDX_PID_COLIBRI_VF50IT 0x0019 /* USB DFU */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_NAND -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024 * 1024) /* USB Storage */ diff --git a/include/configs/corvus.h b/include/configs/corvus.h index 6521dde..5e60941 100644 --- a/include/configs/corvus.h +++ b/include/configs/corvus.h @@ -112,8 +112,6 @@ #define CONFIG_MTD_PARTITIONS /* DFU class support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_NAND #define CONFIG_SYS_DFU_DATA_BUF_SIZE (SZ_1M) #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 194804c..cecb00f 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -205,14 +205,6 @@ #define CONFIG_OMAP_USB_PHY #define CONFIG_OMAP_USB2PHY2_HOST -/* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_RAM - -#define CONFIG_DFU_MMC -#define CONFIG_DFU_RAM -#define CONFIG_DFU_SF - /* SATA */ #define CONFIG_BOARD_LATE_INIT #define CONFIG_SCSI diff --git a/include/configs/exynos4-common.h b/include/configs/exynos4-common.h index fdbaf02..06fde38 100644 --- a/include/configs/exynos4-common.h +++ b/include/configs/exynos4-common.h @@ -29,8 +29,6 @@ #define CONFIG_CMD_THOR_DOWNLOAD #define CONFIG_USB_FUNCTION_THOR -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M #define DFU_DEFAULT_POLL_TIMEOUT 300 diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 1ee880d..7423cff 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -238,11 +238,6 @@ #define CONFIG_ANDROID_BOOT_IMAGE #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_FASTBOOT_BUF_SIZE 0x07000000 - -/* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC -#define CONFIG_DFU_SF #endif #endif /* __MX6QSABRE_COMMON_CONFIG_H */ diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h index f6a636d..83f3d95 100644 --- a/include/configs/mx7dsabresd.h +++ b/include/configs/mx7dsabresd.h @@ -252,11 +252,6 @@ #define CONFIG_USB_FUNCTION_MASS_STORAGE -/* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC -#define CONFIG_DFU_RAM - #define CONFIG_VIDEO #ifdef CONFIG_VIDEO #define CONFIG_CFB_CONSOLE diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 0b57949..40b48f7 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -45,8 +45,6 @@ #define CONFIG_USB_EHCI_EXYNOS /* DFU */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M #define DFU_DEFAULT_POLL_TIMEOUT 300 #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h index c126990..22614fb 100644 --- a/include/configs/omap5_uevm.h +++ b/include/configs/omap5_uevm.h @@ -96,12 +96,6 @@ #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 80 #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 79 -/* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_RAM - -#define CONFIG_DFU_MMC - /* Enabled commands */ /* USB Networking options */ diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h index 1c46ec3..ed3b64f 100644 --- a/include/configs/pico-imx6ul.h +++ b/include/configs/pico-imx6ul.h @@ -58,8 +58,6 @@ #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_VBUS_DRAW 2 -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M #define DFU_DEFAULT_POLL_TIMEOUT 300 diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 61c5663..72286dd 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -65,8 +65,6 @@ #define CONFIG_CMD_GPT /* USB Composite download gadget - g_dnl */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M #define DFU_DEFAULT_POLL_TIMEOUT 300 diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index d81e1a5..c53bd66 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -216,8 +216,6 @@ #define CONFIG_USBD_HS /* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_NAND #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1 << 20) #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h index 1ea41a2..fd557a9 100644 --- a/include/configs/smartweb.h +++ b/include/configs/smartweb.h @@ -166,8 +166,6 @@ #define CONFIG_USB_GADGET_AT91 /* DFU class support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_NAND #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M #define DFU_MANIFEST_POLL_TIMEOUT 25000 #endif diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 084874d..e1faf38 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -241,10 +241,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void); #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE) #define CONFIG_USB_FUNCTION_MASS_STORAGE -#define CONFIG_USB_FUNCTION_DFU -#ifdef CONFIG_DM_MMC -#define CONFIG_DFU_MMC -#endif #define CONFIG_SYS_DFU_DATA_BUF_SIZE (32 * 1024 * 1024) #define DFU_DEFAULT_POLL_TIMEOUT 300 diff --git a/include/configs/socfpga_vining_fpga.h b/include/configs/socfpga_vining_fpga.h index 8d90c91..c5555e6 100644 --- a/include/configs/socfpga_vining_fpga.h +++ b/include/configs/socfpga_vining_fpga.h @@ -215,10 +215,6 @@ #define CONFIG_MISC_INIT_R #define CONFIG_BOARD_LATE_INIT -/* Enable DFU to SF and RAM */ -#define CONFIG_DFU_RAM -#define CONFIG_DFU_SF - /* Support changing the prompt string */ #define CONFIG_CMDLINE_PS_SUPPORT diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index deb2e8d..d261fb3 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -332,15 +332,10 @@ extern int soft_i2c_gpio_scl; #endif #ifdef CONFIG_USB_MUSB_GADGET -#define CONFIG_USB_FUNCTION_DFU #define CONFIG_USB_FUNCTION_FASTBOOT #define CONFIG_USB_FUNCTION_MASS_STORAGE #endif -#ifdef CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_RAM -#endif - #ifdef CONFIG_USB_FUNCTION_FASTBOOT #define CONFIG_CMD_FASTBOOT #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR diff --git a/include/configs/taurus.h b/include/configs/taurus.h index af0b841..1be4341 100644 --- a/include/configs/taurus.h +++ b/include/configs/taurus.h @@ -128,8 +128,6 @@ #define CONFIG_USB_GADGET_AT91 /* DFU class support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_NAND #define CONFIG_SYS_DFU_DATA_BUF_SIZE (SZ_1M) #define DFU_MANIFEST_POLL_TIMEOUT 25000 #endif diff --git a/include/configs/tegra-common-usb-gadget.h b/include/configs/tegra-common-usb-gadget.h index 3e3eeea..00f854e 100644 --- a/include/configs/tegra-common-usb-gadget.h +++ b/include/configs/tegra-common-usb-gadget.h @@ -14,16 +14,8 @@ /* USB mass storage protocol */ #define CONFIG_USB_FUNCTION_MASS_STORAGE /* DFU protocol */ -#define CONFIG_USB_FUNCTION_DFU #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M #define CONFIG_SYS_DFU_MAX_FILE_SIZE SZ_32M -#ifdef CONFIG_MMC -#define CONFIG_DFU_MMC -#endif -#ifdef CONFIG_SPI_FLASH -#define CONFIG_DFU_SF -#endif -#define CONFIG_DFU_RAM #endif #endif /* _TEGRA_COMMON_USB_GADGET_H_ */ diff --git a/include/configs/warp.h b/include/configs/warp.h index 6665184..b35b795 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -75,8 +75,6 @@ #define CONFIG_USB_FUNCTION_MASS_STORAGE -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M #define DFU_DEFAULT_POLL_TIMEOUT 300 diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 89a6fcc..9642dd9 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -144,8 +144,6 @@ #define CONFIG_USB_FUNCTION_MASS_STORAGE /* USB Device Firmware Update support */ -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_MMC #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M #define DFU_DEFAULT_POLL_TIMEOUT 300 diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 5ed8beb..adc42cf 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -116,8 +116,6 @@ #define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000 #define DFU_DEFAULT_POLL_TIMEOUT 300 -#define CONFIG_USB_FUNCTION_DFU -#define CONFIG_DFU_RAM #define CONFIG_USB_CABLE_CHECK #define CONFIG_CMD_THOR_DOWNLOAD #define CONFIG_USB_FUNCTION_THOR diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 260df2f..f1c9bed 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -90,8 +90,6 @@ # define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x600000 # define DFU_DEFAULT_POLL_TIMEOUT 300 -# define CONFIG_USB_FUNCTION_DFU -# define CONFIG_DFU_RAM # define CONFIG_USB_CABLE_CHECK # define CONFIG_CMD_THOR_DOWNLOAD # define CONFIG_THOR_RESET_OFF @@ -106,7 +104,6 @@ "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" # if defined(CONFIG_ZYNQ_SDHCI) -# define CONFIG_DFU_MMC # define DFU_ALT_INFO_MMC \ "dfu_mmc_info=" \ "set dfu_alt_info " \ -- cgit v1.1