This allows building the SPL without driver model for USB. Since
CONFIG_SPL_DM_USB is enabled if and only if CONFIG_DM_USB was enabled
before, this patch does not change the build behaviour.
Signed-off-by: Sven Schwermer <sven@svenschwermer.de>
declared with the U_BOOT_USB_DEVICE() macro and will be
automatically probed when found on the bus.
+config SPL_DM_USB
+ bool "Enable driver model for USB in SPL"
+ depends on DM_USB
+ default y
+
source "drivers/usb/host/Kconfig"
source "drivers/usb/dwc3/Kconfig"
# (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
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-ifdef CONFIG_DM_USB
+ifdef CONFIG_$(SPL_)DM_USB
obj-$(CONFIG_CMD_USB) += usb-uclass.o
obj-$(CONFIG_SANDBOX) += usb-sandbox.o
endif