[U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs

Rask Ingemann Lambertsen rask at formelder.dk
Sun Jul 30 21:01:47 UTC 2017


On Mon, Jun 26, 2017 at 04:05:41AM -0700, Bin Meng wrote:
> The following 3 Kconfig options
> - CONFIG_SYS_USB_EVENT_POLL
> - CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
> - CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
> 
> are already converted to Kconfig. Let's clean up all board configs to
> switch over to use them.
> 
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
[snip]
> diff --git a/configs/Sunchip_CX-A99_defconfig b/configs/Sunchip_CX-A99_defconfig
> index 0641b1f..2284bd3 100644
> --- a/configs/Sunchip_CX-A99_defconfig
> +++ b/configs/Sunchip_CX-A99_defconfig
> @@ -18,3 +18,4 @@ CONFIG_SPL=y
>  # CONFIG_SPL_DOS_PARTITION is not set
>  # CONFIG_SPL_ISO_PARTITION is not set
>  # CONFIG_SPL_EFI_PARTITION is not set
> +CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
[snip]
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index ee669cb..da91117 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -340,7 +340,6 @@ extern int soft_i2c_gpio_scl;
>  
>  #ifdef CONFIG_USB_KEYBOARD
>  #define CONFIG_PREBOOT
> -#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
>  #endif
>  
>  #define CONFIG_MISC_INIT_R

Rather than adding that option to each and every SUNXI board's defconfig
when removing it from include/configs/sunxi-common.h, wouldn't it better
to set it from arch/arm/Kconfig instead? Something like this (untested):

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index dce4105561..ab4837bd14 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -673,6 +673,7 @@ config ARCH_SUNXI
	select USB if DISTRO_DEFAULTS
	select USB_STORAGE if DISTRO_DEFAULTS
	select USB_KEYBOARD if DISTRO_DEFAULTS
+	select SYS_USB_EVENT_POLL_VIA_INT_QUEUE if DISTRO_DEFAULTS
	select USE_TINY_PRINTF
	imply FAT_WRITE
	imply PRE_CONSOLE_BUFFER

Because it seems to me that it's common to the SUNXI architecture boards
rather than something board specific.

-- 
Rask Ingemann Lambertsen


More information about the U-Boot mailing list