diff mbox

[U-Boot,v2,1/6] configs: am335x_evm: Enable FASTBOOT based on kconfig

Message ID 20170207031737.2680-2-alex.g@adaptrum.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Alexandru Gagniuc Feb. 7, 2017, 3:17 a.m. UTC
When CONFIG_CMD_FASTBOOT or CONFIG_USB_FUNCTION_FASTBOOT are defined
in am335x_evm.h, a dependency on g_dnl.c is created. This in turn
creates a dependency on having USB gadget enabled.
As a result we can't create configs with USB gadget disabled.

Since these CONFIG_ variables are now part of kconfig, move them to
the board defconfigs, and out of am335x_evm.h. This both preserves
current defaults, and allows creating configs with USB gadget off.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
---
 configs/am335x_boneblack_defconfig       | 5 +++++
 configs/am335x_boneblack_vboot_defconfig | 5 +++++
 configs/am335x_evm_defconfig             | 5 +++++
 configs/am335x_evm_nor_defconfig         | 5 +++++
 configs/am335x_evm_norboot_defconfig     | 5 +++++
 configs/am335x_evm_spiboot_defconfig     | 5 +++++
 configs/am335x_evm_usbspl_defconfig      | 5 +++++
 configs/am335x_hs_evm_defconfig          | 5 +++++
 include/configs/am335x_evm.h             | 4 ----
 9 files changed, 40 insertions(+), 4 deletions(-)

Comments

Tom Rini Feb. 7, 2017, 6:23 p.m. UTC | #1
On Mon, Feb 06, 2017 at 07:17:32PM -0800, Alexandru Gagniuc wrote:

> When CONFIG_CMD_FASTBOOT or CONFIG_USB_FUNCTION_FASTBOOT are defined
> in am335x_evm.h, a dependency on g_dnl.c is created. This in turn
> creates a dependency on having USB gadget enabled.
> As a result we can't create configs with USB gadget disabled.
> 
> Since these CONFIG_ variables are now part of kconfig, move them to
> the board defconfigs, and out of am335x_evm.h. This both preserves
> current defaults, and allows creating configs with USB gadget off.
> 
> Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini July 12, 2017, 12:14 p.m. UTC | #2
On Mon, Feb 06, 2017 at 07:17:32PM -0800, Alexandru Gagniuc wrote:

> When CONFIG_CMD_FASTBOOT or CONFIG_USB_FUNCTION_FASTBOOT are defined
> in am335x_evm.h, a dependency on g_dnl.c is created. This in turn
> creates a dependency on having USB gadget enabled.
> As a result we can't create configs with USB gadget disabled.
> 
> Since these CONFIG_ variables are now part of kconfig, move them to
> the board defconfigs, and out of am335x_evm.h. This both preserves
> current defaults, and allows creating configs with USB gadget off.
> 
> Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig
index 2df4976..325242b 100644
--- a/configs/am335x_boneblack_defconfig
+++ b/configs/am335x_boneblack_defconfig
@@ -5,6 +5,9 @@  CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
@@ -28,6 +31,7 @@  CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_FASTBOOT=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_DFU_TFTP=y
@@ -41,6 +45,7 @@  CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index e425260..a0bbfe6 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -6,6 +6,9 @@  CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT,ENABLE_VBOOT"
@@ -31,6 +34,7 @@  CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_FASTBOOT=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
@@ -51,6 +55,7 @@  CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index ab7b9aa..3205904 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -5,6 +5,9 @@  CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -26,6 +29,7 @@  CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_FASTBOOT=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
@@ -51,6 +55,7 @@  CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_MUSB_TI=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/configs/am335x_evm_nor_defconfig b/configs/am335x_evm_nor_defconfig
index 8a63ad2..d9aa3a2 100644
--- a/configs/am335x_evm_nor_defconfig
+++ b/configs/am335x_evm_nor_defconfig
@@ -5,6 +5,9 @@  CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_NOR=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
@@ -24,6 +27,7 @@  CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_FASTBOOT=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_DFU_MMC=y
@@ -37,6 +41,7 @@  CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index f77b50c..56e119e 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -4,6 +4,9 @@  CONFIG_TARGET_AM335X_EVM=y
 CONFIG_NOR=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_NOR_BOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
@@ -19,6 +22,7 @@  CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_FASTBOOT=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_DFU_MMC=y
@@ -31,6 +35,7 @@  CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index 26f1f37..99fcdd3 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -7,6 +7,9 @@  CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_SYS_EXTRA_OPTIONS="SPI_BOOT"
 CONFIG_SPI_BOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -19,6 +22,7 @@  CONFIG_SPL_MUSB_NEW_SUPPORT=y
 CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPT=y
+CONFIG_CMD_FASTBOOT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
@@ -38,6 +42,7 @@  CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index a79470e..6ed9b9a 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -3,6 +3,9 @@  CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -16,6 +19,7 @@  CONFIG_SPL_NET_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CMD_FASTBOOT=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
@@ -38,6 +42,7 @@  CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig
index d6224bc..8f16b1b 100644
--- a/configs/am335x_hs_evm_defconfig
+++ b/configs/am335x_hs_evm_defconfig
@@ -9,6 +9,9 @@  CONFIG_SPL_STACK_R_ADDR=0x82000000
 # CONFIG_SPL_YMODEM_SUPPORT is not set
 CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x81000000
+CONFIG_FASTBOOT_BUF_SIZE=0x07000000
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_SPL_LOAD_FIT=y
@@ -22,6 +25,7 @@  CONFIG_SPL_STACK_R=y
 CONFIG_SPL_MTD_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CMD_FASTBOOT=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
@@ -52,6 +56,7 @@  CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index d8e6ba3..85c0728 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -264,11 +264,7 @@ 
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 /* Fastboot */
-#define CONFIG_USB_FUNCTION_FASTBOOT
-#define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
-#define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
-#define CONFIG_FASTBOOT_BUF_SIZE	0x07000000
 
 #define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
 #endif