On Thu, Aug 22, 2019 at 03:41:45PM -0500, Adam Ford wrote: > I have boards (omap3_logic and omap3_logic_somlv) which do not want > USB enabled for SPL yet SPL is showing USB chunks being compiled into > it. > > I had to create a patch [1] which disables the USB host controller > when in SPL, yet some of the framework is still present. There appears > to be an option in the SPL menu for enabling/disabling "Support USB > host drivers" and an option for "Support USB Gadget drivers" and for > me, neither are selected. What I'd like to do is kill off all the USB > code inside SPL to shrink the size. > > When I look at the Makefile for the USB host, there doesn't appear to > be any checks for whether or not we're in SPL. > > There also appears to be an inconsistency in where to place the > options for enabling something in SPL. In some cases, high-level > options are listed in SPL/TPL menu, but in other instances, the > options are listed under the "Device Drivers" menu. What I'd like to > do is add a menu option for CONFIG_SPL_USB which lets people turn off > all USB code when in SPL if they don't want any, then fix up the > Makefiles to use the SPL/TPL macros to determine if we need to build > or not. > > My question is is...Where should the menu item for enabling > CONFIG_SPL_USB be used, in the SPL/TPL menu or the USB menu?
We're indeed not consistent enough here. Given how large common/spl/Kconfig is already today I suspect the right answer is that more things should be grouped closer to their non-SPL/TPL counterpart questions, with correct depends on lines. And options with names such that we can't use CONFIG_IS_ENABLED(FOO)/obj-$(CONFIG_$(SPL_TPL_)_FOO) need to be renamed as well. That should in turn lead to being able to correctly drop USB out of SPL for example. -- Tom
signature.asc
Description: PGP signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot