[U-Boot] [PATCH v2 1/4] usb: Introduce CONFIG_SPL_DM_USB

Marek Vasut marex at denx.de
Sun Nov 18 03:31:49 UTC 2018


On 11/17/2018 12:37 PM, Sven Schwermer wrote:
> This allows building the SPL without driver model for USB.
> 
> Signed-off-by: Sven Schwermer <sven at svenschwermer.de>
> ---
>  common/Makefile             | 2 +-
>  drivers/usb/Kconfig         | 5 +++++
>  drivers/usb/common/Makefile | 2 +-
>  drivers/usb/host/Makefile   | 5 +++--
>  4 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/common/Makefile b/common/Makefile
> index a2388364d9..7d88077930 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -33,7 +33,7 @@ obj-$(CONFIG_MII) += miiphyutil.o
>  obj-$(CONFIG_CMD_MII) += miiphyutil.o
>  obj-$(CONFIG_PHYLIB) += miiphyutil.o
>  
> -ifdef CONFIG_CMD_USB
> +ifdef CONFIG_USB

Shouldn't this be a separate change ?

>  obj-y += usb.o usb_hub.o
>  obj-$(CONFIG_USB_STORAGE) += usb_storage.o
>  endif
> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> index 4fbe172e05..03746dd12f 100644
> --- a/drivers/usb/Kconfig
> +++ b/drivers/usb/Kconfig
> @@ -47,6 +47,11 @@ config DM_USB
>  	  declared with the U_BOOT_USB_DEVICE() macro and will be
>  	  automatically probed when found on the bus.
>  
> +config SPL_DM_USB

I think this should be introduced last, after all the core changes,
since this patch won't compile cleanly on it's own, will it ?

> +	bool "Enable driver model for USB in SPL"
> +	depends on DM_USB
> +	default y
> +
>  source "drivers/usb/host/Kconfig"
>  
>  source "drivers/usb/dwc3/Kconfig"
> diff --git a/drivers/usb/common/Makefile b/drivers/usb/common/Makefile
> index 55e0547b16..3bedbf213f 100644
> --- a/drivers/usb/common/Makefile
> +++ b/drivers/usb/common/Makefile
> @@ -3,6 +3,6 @@
>  # (C) Copyright 2016 Freescale Semiconductor, Inc.
>  #
>  
> -obj-$(CONFIG_DM_USB) += common.o
> +obj-$(CONFIG_$(SPL_)DM_USB) += common.o
>  obj-$(CONFIG_USB_EHCI_FSL) += fsl-dt-fixup.o fsl-errata.o
>  obj-$(CONFIG_USB_XHCI_FSL) += fsl-dt-fixup.o fsl-errata.o
> diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
> index cb8c315a15..2a3eec1eee 100644
> --- a/drivers/usb/host/Makefile
> +++ b/drivers/usb/host/Makefile
> @@ -3,8 +3,9 @@
>  # (C) Copyright 2000-2007
>  # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
>  
> -ifdef CONFIG_DM_USB
> -obj-$(CONFIG_CMD_USB) += usb-uclass.o
> +obj-$(CONFIG_$(SPL_)DM_USB) += usb-uclass.o
> +
> +ifdef CONFIG_$(SPL_)DM_USB
>  obj-$(CONFIG_SANDBOX) += usb-sandbox.o
>  endif
>  
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list