diff mbox series

[v2,09/14] sunxi: imply USB_GADGET

Message ID 87f4f66f2cc60d14667fafe84b3c9f3ddd252779.1505242834.git-series.maxime.ripard@free-electrons.com
State Accepted
Commit 654b02b18c00c9c2d26f9cd7df53d27e9fc37e4f
Headers show
Series sunxi: convert musb to the device model and enable usb_ether | expand

Commit Message

Maxime Ripard Sept. 12, 2017, 7:01 p.m. UTC
A good number of our boards have USB_GADGET enabled. Imply it so that all
the boards can benefit from it, and remove some boilerplate from our
defconfigs.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/Kconfig                               | 1 +
 configs/A13-OLinuXino_defconfig                | 1 -
 configs/A20-OLinuXino-Lime2-eMMC_defconfig     | 1 -
 configs/A20-OLinuXino-Lime2_defconfig          | 1 -
 configs/CHIP_defconfig                         | 1 -
 configs/CHIP_pro_defconfig                     | 1 -
 configs/Cubietruck_defconfig                   | 1 -
 configs/Nintendo_NES_Classic_Edition_defconfig | 1 -
 configs/Sinlinx_SinA33_defconfig               | 1 -
 configs/parrot_r16_defconfig                   | 1 -
 10 files changed, 1 insertion(+), 9 deletions(-)

Comments

Lukasz Majewski Sept. 13, 2017, 10:42 a.m. UTC | #1
On 09/12/2017 09:01 PM, Maxime Ripard wrote:
> A good number of our boards have USB_GADGET enabled. Imply it so that all
> the boards can benefit from it, and remove some boilerplate from our
> defconfigs.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>   arch/arm/Kconfig                               | 1 +
>   configs/A13-OLinuXino_defconfig                | 1 -
>   configs/A20-OLinuXino-Lime2-eMMC_defconfig     | 1 -
>   configs/A20-OLinuXino-Lime2_defconfig          | 1 -
>   configs/CHIP_defconfig                         | 1 -
>   configs/CHIP_pro_defconfig                     | 1 -
>   configs/Cubietruck_defconfig                   | 1 -
>   configs/Nintendo_NES_Classic_Edition_defconfig | 1 -
>   configs/Sinlinx_SinA33_defconfig               | 1 -
>   configs/parrot_r16_defconfig                   | 1 -
>   10 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 53eae8953e0b..1eb59c591a54 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -705,6 +705,7 @@ config ARCH_SUNXI
>   	imply SPL_POWER_SUPPORT
>   	imply SPL_SERIAL_SUPPORT
>   	imply USB_FUNCTION_FASTBOOT
> +	imply USB_GADGET
>   
>   config TARGET_TS4600
>   	bool "Support TS4600"
> diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
> index ae790164dff7..e55dbff44d36 100644
> --- a/configs/A13-OLinuXino_defconfig
> +++ b/configs/A13-OLinuXino_defconfig
> @@ -31,5 +31,4 @@ CONFIG_AXP_ALDO3_VOLT=3300
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
> diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
> index b136af66b71f..9491708d80c6 100644
> --- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
> +++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
> @@ -33,5 +33,4 @@ CONFIG_SCSI=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
> diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
> index ebb435f30956..2bb8ee8c9ebd 100644
> --- a/configs/A20-OLinuXino-Lime2_defconfig
> +++ b/configs/A20-OLinuXino-Lime2_defconfig
> @@ -32,5 +32,4 @@ CONFIG_SCSI=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
> diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
> index 7d50d0533dcd..b9f70d240c3c 100644
> --- a/configs/CHIP_defconfig
> +++ b/configs/CHIP_defconfig
> @@ -22,6 +22,5 @@ CONFIG_AXP_ALDO4_VOLT=3300
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
>   CONFIG_OF_LIBFDT_OVERLAY=y
> diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig
> index 76daf477ec87..74f6eb10fc01 100644
> --- a/configs/CHIP_pro_defconfig
> +++ b/configs/CHIP_pro_defconfig
> @@ -27,6 +27,5 @@ CONFIG_AXP_ALDO4_VOLT=3300
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
>   CONFIG_OF_LIBFDT_OVERLAY=y
> diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
> index 1b2989d364f6..458e2a9d8b04 100644
> --- a/configs/Cubietruck_defconfig
> +++ b/configs/Cubietruck_defconfig
> @@ -32,5 +32,4 @@ CONFIG_SCSI=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
> diff --git a/configs/Nintendo_NES_Classic_Edition_defconfig b/configs/Nintendo_NES_Classic_Edition_defconfig
> index 5986764a14b9..e031dd8f5d5f 100644
> --- a/configs/Nintendo_NES_Classic_Edition_defconfig
> +++ b/configs/Nintendo_NES_Classic_Edition_defconfig
> @@ -22,5 +22,4 @@ CONFIG_AXP_DLDO1_VOLT=3300
>   CONFIG_AXP_ELDO2_VOLT=1800
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
> diff --git a/configs/Sinlinx_SinA33_defconfig b/configs/Sinlinx_SinA33_defconfig
> index 9299aedd6019..143a9b4b6c10 100644
> --- a/configs/Sinlinx_SinA33_defconfig
> +++ b/configs/Sinlinx_SinA33_defconfig
> @@ -27,5 +27,4 @@ CONFIG_DFU_RAM=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
> diff --git a/configs/parrot_r16_defconfig b/configs/parrot_r16_defconfig
> index 57db9587fe77..b36b9efec650 100644
> --- a/configs/parrot_r16_defconfig
> +++ b/configs/parrot_r16_defconfig
> @@ -23,5 +23,4 @@ CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_MUSB_GADGET=y
>   CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
> -CONFIG_USB_GADGET=y
>   CONFIG_USB_GADGET_DOWNLOAD=y
> 
Reviewed-by: Ɓukasz Majewski <lukma@denx.de>
Chen-Yu Tsai Sept. 22, 2017, 3:20 a.m. UTC | #2
On Wed, Sep 13, 2017 at 3:01 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> A good number of our boards have USB_GADGET enabled. Imply it so that all
> the boards can benefit from it, and remove some boilerplate from our
> defconfigs.
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

This breaks builds using defconfigs where USB_MUSB_GADGET is not set.
Perhaps a better solution would be to imply USB_GADGET from USB_MUSB_GADGET?
Kconfig complains about recursive dependencies if I do

    imply USB_GADGET if USB_MUSB_GADGET

under ARCH_SUNXI though.

ChenYu
Maxime Ripard Sept. 22, 2017, 7:53 a.m. UTC | #3
Hi,

On Fri, Sep 22, 2017 at 03:20:33AM +0000, Chen-Yu Tsai wrote:
> On Wed, Sep 13, 2017 at 3:01 AM, Maxime Ripard

> <maxime.ripard@free-electrons.com> wrote:

> > A good number of our boards have USB_GADGET enabled. Imply it so that all

> > the boards can benefit from it, and remove some boilerplate from our

> > defconfigs.

> >

> > Reviewed-by: Simon Glass <sjg@chromium.org>

> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

> 

> This breaks builds using defconfigs where USB_MUSB_GADGET is not set.

> Perhaps a better solution would be to imply USB_GADGET from USB_MUSB_GADGET?

> Kconfig complains about recursive dependencies if I do

> 

>     imply USB_GADGET if USB_MUSB_GADGET

> 

> under ARCH_SUNXI though.


Thanks, I just pushed a fix for it.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 53eae8953e0b..1eb59c591a54 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -705,6 +705,7 @@  config ARCH_SUNXI
 	imply SPL_POWER_SUPPORT
 	imply SPL_SERIAL_SUPPORT
 	imply USB_FUNCTION_FASTBOOT
+	imply USB_GADGET
 
 config TARGET_TS4600
 	bool "Support TS4600"
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index ae790164dff7..e55dbff44d36 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -31,5 +31,4 @@  CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
index b136af66b71f..9491708d80c6 100644
--- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
@@ -33,5 +33,4 @@  CONFIG_SCSI=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index ebb435f30956..2bb8ee8c9ebd 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -32,5 +32,4 @@  CONFIG_SCSI=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
index 7d50d0533dcd..b9f70d240c3c 100644
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@ -22,6 +22,5 @@  CONFIG_AXP_ALDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig
index 76daf477ec87..74f6eb10fc01 100644
--- a/configs/CHIP_pro_defconfig
+++ b/configs/CHIP_pro_defconfig
@@ -27,6 +27,5 @@  CONFIG_AXP_ALDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index 1b2989d364f6..458e2a9d8b04 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -32,5 +32,4 @@  CONFIG_SCSI=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/Nintendo_NES_Classic_Edition_defconfig b/configs/Nintendo_NES_Classic_Edition_defconfig
index 5986764a14b9..e031dd8f5d5f 100644
--- a/configs/Nintendo_NES_Classic_Edition_defconfig
+++ b/configs/Nintendo_NES_Classic_Edition_defconfig
@@ -22,5 +22,4 @@  CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_AXP_ELDO2_VOLT=1800
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/Sinlinx_SinA33_defconfig b/configs/Sinlinx_SinA33_defconfig
index 9299aedd6019..143a9b4b6c10 100644
--- a/configs/Sinlinx_SinA33_defconfig
+++ b/configs/Sinlinx_SinA33_defconfig
@@ -27,5 +27,4 @@  CONFIG_DFU_RAM=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/parrot_r16_defconfig b/configs/parrot_r16_defconfig
index 57db9587fe77..b36b9efec650 100644
--- a/configs/parrot_r16_defconfig
+++ b/configs/parrot_r16_defconfig
@@ -23,5 +23,4 @@  CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
-CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y