From mboxrd@z Thu Jan 1 00:00:00 1970 From: Abel Vesa Date: Tue, 15 Jan 2019 16:05:43 +0000 Subject: [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper In-Reply-To: <20190115160209.GB27429@bill-the-cat> References: <1547550423-10070-1-git-send-email-abel.vesa@nxp.com> <20190115160209.GB27429@bill-the-cat> Message-ID: <20190115160542.xxqawfj6blvnvdcm@fsr-ub1664-175> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 19-01-15 11:02:09, Tom Rini wrote: > On Tue, Jan 15, 2019 at 11:07:23AM +0000, Abel Vesa wrote: > > > Some boards might need USB_STORAGE enabled in u-boot proper but not in SPL. > > Make a separate config for SPL and keep the same depends on conditions but for SPL. > > > > Signed-off-by: Abel Vesa > > --- > > common/Makefile | 2 +- > > configs/apalis_imx6_defconfig | 1 + > > configs/colibri_imx6_defconfig | 1 + > > configs/mx6sabresd_defconfig | 1 + > > drivers/usb/Kconfig | 8 ++++++++ > > 5 files changed, 12 insertions(+), 1 deletion(-) > > The root problem here, as I discovered today digging in another patch is > that in essence CONFIG_SPL_USB_SUPPORT is mis-named and should be > CONFIG_SPL_USB_STORAGE and all cases in Makefiles of Ithink those too are two separete thing. You can have SPL_USB_SUPPORT enabled, but the SPL_USB_STORAGE disabled. For example, for SDP support in SPL you need SPL_USB_SUPPORT, but you don't need the SPL_USB_STORAGE. So, IMO, they need to remain two separate things. > obj-$(CONFIG_USB_STORAGE) should be obj-$(CONFIG_$(SPL_)USB_STORAGE) and > common/spl/spl_usb.c have its ifdef's cleaned slightly as that code > cannot function without CONFIG_USB_STORAGE set (stor_dev will be NULL > and that _will_ oops later on). > > -- > Tom