All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
@ 2019-01-15 11:07 Abel Vesa
  2019-01-15 11:27 ` Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Abel Vesa @ 2019-01-15 11:07 UTC (permalink / raw)
  To: u-boot

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 <abel.vesa@nxp.com>
---
 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(-)

diff --git a/common/Makefile b/common/Makefile
index 0de60b3..34931f3 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -77,7 +77,7 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
 
 ifdef CONFIG_SPL_USB_HOST_SUPPORT
 obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
-obj-$(CONFIG_USB_STORAGE) += usb_storage.o
+obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o
 else
 obj-$(CONFIG_USB_MUSB_HOST) += usb.o
 endif
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index e02d9bc..c4916ad 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_SPL_USB_STORAGE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Apalis iMX6 # "
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index 68f0746..441a4e7 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_SPL_USB_STORAGE=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Colibri iMX6 # "
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index 1857c18..3532fce 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -21,6 +21,7 @@ CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_SPL_USB_STORAGE=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 3b53bf2..4185e16 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -89,6 +89,14 @@ config USB_STORAGE
 	  Say Y here if you want to connect USB mass storage devices to your
 	  board's USB port.
 
+config SPL_USB_STORAGE
+	bool "SPL USB Mass Storage support"
+	depends on !(SPL_BLK && !SPL_DM_USB)
+	---help---
+	  Say Y here if you want to connect USB mass storage devices to your
+	  board's USB port in SPL.
+
+
 config USB_KEYBOARD
 	bool "USB Keyboard support"
 	select SYS_STDIO_DEREGISTER
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 11:07 [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper Abel Vesa
@ 2019-01-15 11:27 ` Marek Vasut
  2019-01-15 12:17   ` Abel Vesa
  2019-01-15 13:08 ` Vignesh R
  2019-01-15 16:02 ` Tom Rini
  2 siblings, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2019-01-15 11:27 UTC (permalink / raw)
  To: u-boot

On 1/15/19 12:07 PM, 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.

Is this new or is this something which worked before and broke in the
last few releases ? I recall discussing a patch changing this behavior
before.

> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> ---
>  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(-)
> 
> diff --git a/common/Makefile b/common/Makefile
> index 0de60b3..34931f3 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -77,7 +77,7 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
>  
>  ifdef CONFIG_SPL_USB_HOST_SUPPORT
>  obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
> -obj-$(CONFIG_USB_STORAGE) += usb_storage.o
> +obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o

Should be obj-$(CONFIG_$(SPL_)USB_STORAGE) += usb_storage.o

>  else
>  obj-$(CONFIG_USB_MUSB_HOST) += usb.o
>  endif
> diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
> index e02d9bc..c4916ad 100644
> --- a/configs/apalis_imx6_defconfig
> +++ b/configs/apalis_imx6_defconfig
> @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
>  CONFIG_SPL_USB_HOST_SUPPORT=y
>  CONFIG_SPL_USB_GADGET=y
>  CONFIG_SPL_USB_SDP_SUPPORT=y
> +CONFIG_SPL_USB_STORAGE=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="Apalis iMX6 # "
>  CONFIG_CMD_BOOTZ=y
> diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
> index 68f0746..441a4e7 100644
> --- a/configs/colibri_imx6_defconfig
> +++ b/configs/colibri_imx6_defconfig
> @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
>  CONFIG_SPL_USB_HOST_SUPPORT=y
>  CONFIG_SPL_USB_GADGET=y
>  CONFIG_SPL_USB_SDP_SUPPORT=y
> +CONFIG_SPL_USB_STORAGE=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="Colibri iMX6 # "
>  CONFIG_CMD_BOOTZ=y
> diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
> index 1857c18..3532fce 100644
> --- a/configs/mx6sabresd_defconfig
> +++ b/configs/mx6sabresd_defconfig
> @@ -21,6 +21,7 @@ CONFIG_SPL_OS_BOOT=y
>  CONFIG_SPL_USB_HOST_SUPPORT=y
>  CONFIG_SPL_USB_GADGET=y
>  CONFIG_SPL_USB_SDP_SUPPORT=y
> +CONFIG_SPL_USB_STORAGE=y
>  CONFIG_SPL_WATCHDOG_SUPPORT=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> index 3b53bf2..4185e16 100644
> --- a/drivers/usb/Kconfig
> +++ b/drivers/usb/Kconfig
> @@ -89,6 +89,14 @@ config USB_STORAGE
>  	  Say Y here if you want to connect USB mass storage devices to your
>  	  board's USB port.
>  
> +config SPL_USB_STORAGE
> +	bool "SPL USB Mass Storage support"
> +	depends on !(SPL_BLK && !SPL_DM_USB)
> +	---help---
> +	  Say Y here if you want to connect USB mass storage devices to your
> +	  board's USB port in SPL.
> +
> +
>  config USB_KEYBOARD
>  	bool "USB Keyboard support"
>  	select SYS_STDIO_DEREGISTER
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 11:27 ` Marek Vasut
@ 2019-01-15 12:17   ` Abel Vesa
  0 siblings, 0 replies; 10+ messages in thread
From: Abel Vesa @ 2019-01-15 12:17 UTC (permalink / raw)
  To: u-boot

On 19-01-15 12:27:11, Marek Vasut wrote:
> On 1/15/19 12:07 PM, 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.
> 
> Is this new or is this something which worked before and broke in the
> last few releases ? I recall discussing a patch changing this behavior
> before.

I don't know about any discussion. I met this issue now that I'm trying to
get FIT + DM in SPL for mx6sabresd . On mx6sabresd, the SPL doesn't fit into sram
when DM + FIT is enabled if I leave the USB_STORAGE in. So that's the reason I need
this splitting.

> 
> > Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> > ---
> >  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(-)
> > 
> > diff --git a/common/Makefile b/common/Makefile
> > index 0de60b3..34931f3 100644
> > --- a/common/Makefile
> > +++ b/common/Makefile
> > @@ -77,7 +77,7 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
> >  
> >  ifdef CONFIG_SPL_USB_HOST_SUPPORT
> >  obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
> > -obj-$(CONFIG_USB_STORAGE) += usb_storage.o
> > +obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o
> 
> Should be obj-$(CONFIG_$(SPL_)USB_STORAGE) += usb_storage.o
> 

Will fix and resend.

> >  else
> >  obj-$(CONFIG_USB_MUSB_HOST) += usb.o
> >  endif
> > diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
> > index e02d9bc..c4916ad 100644
> > --- a/configs/apalis_imx6_defconfig
> > +++ b/configs/apalis_imx6_defconfig
> > @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
> >  CONFIG_SPL_USB_HOST_SUPPORT=y
> >  CONFIG_SPL_USB_GADGET=y
> >  CONFIG_SPL_USB_SDP_SUPPORT=y
> > +CONFIG_SPL_USB_STORAGE=y
> >  CONFIG_HUSH_PARSER=y
> >  CONFIG_SYS_PROMPT="Apalis iMX6 # "
> >  CONFIG_CMD_BOOTZ=y
> > diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
> > index 68f0746..441a4e7 100644
> > --- a/configs/colibri_imx6_defconfig
> > +++ b/configs/colibri_imx6_defconfig
> > @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
> >  CONFIG_SPL_USB_HOST_SUPPORT=y
> >  CONFIG_SPL_USB_GADGET=y
> >  CONFIG_SPL_USB_SDP_SUPPORT=y
> > +CONFIG_SPL_USB_STORAGE=y
> >  CONFIG_HUSH_PARSER=y
> >  CONFIG_SYS_PROMPT="Colibri iMX6 # "
> >  CONFIG_CMD_BOOTZ=y
> > diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
> > index 1857c18..3532fce 100644
> > --- a/configs/mx6sabresd_defconfig
> > +++ b/configs/mx6sabresd_defconfig
> > @@ -21,6 +21,7 @@ CONFIG_SPL_OS_BOOT=y
> >  CONFIG_SPL_USB_HOST_SUPPORT=y
> >  CONFIG_SPL_USB_GADGET=y
> >  CONFIG_SPL_USB_SDP_SUPPORT=y
> > +CONFIG_SPL_USB_STORAGE=y
> >  CONFIG_SPL_WATCHDOG_SUPPORT=y
> >  CONFIG_HUSH_PARSER=y
> >  CONFIG_CMD_BOOTZ=y
> > diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> > index 3b53bf2..4185e16 100644
> > --- a/drivers/usb/Kconfig
> > +++ b/drivers/usb/Kconfig
> > @@ -89,6 +89,14 @@ config USB_STORAGE
> >  	  Say Y here if you want to connect USB mass storage devices to your
> >  	  board's USB port.
> >  
> > +config SPL_USB_STORAGE
> > +	bool "SPL USB Mass Storage support"
> > +	depends on !(SPL_BLK && !SPL_DM_USB)
> > +	---help---
> > +	  Say Y here if you want to connect USB mass storage devices to your
> > +	  board's USB port in SPL.
> > +
> > +
> >  config USB_KEYBOARD
> >  	bool "USB Keyboard support"
> >  	select SYS_STDIO_DEREGISTER
> > 
> 
> 
> -- 
> Best regards,
> Marek Vasut

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 11:07 [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper Abel Vesa
  2019-01-15 11:27 ` Marek Vasut
@ 2019-01-15 13:08 ` Vignesh R
  2019-01-15 15:42   ` Abel Vesa
  2019-01-15 16:02 ` Tom Rini
  2 siblings, 1 reply; 10+ messages in thread
From: Vignesh R @ 2019-01-15 13:08 UTC (permalink / raw)
  To: u-boot



On 15/01/19 4:37 PM, 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 <abel.vesa@nxp.com>
> ---
>  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(-)

New config SPL_USB_STORAGE should be enabled for all boards that
currently have CONFIG_SPL_USB_HOST_SUPPORT=y and CONFIG_USB_STORAGE=y
right? I see that atleast configs/am43xx_evm_usbhost_boot_defconfig is
not in the above list.

Regards
Vignesh

> 
> diff --git a/common/Makefile b/common/Makefile
> index 0de60b3..34931f3 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -77,7 +77,7 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
>  
>  ifdef CONFIG_SPL_USB_HOST_SUPPORT
>  obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
> -obj-$(CONFIG_USB_STORAGE) += usb_storage.o
> +obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o
>  else
>  obj-$(CONFIG_USB_MUSB_HOST) += usb.o
>  endif
> diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
> index e02d9bc..c4916ad 100644
> --- a/configs/apalis_imx6_defconfig
> +++ b/configs/apalis_imx6_defconfig
> @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
>  CONFIG_SPL_USB_HOST_SUPPORT=y
>  CONFIG_SPL_USB_GADGET=y
>  CONFIG_SPL_USB_SDP_SUPPORT=y
> +CONFIG_SPL_USB_STORAGE=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="Apalis iMX6 # "
>  CONFIG_CMD_BOOTZ=y
> diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
> index 68f0746..441a4e7 100644
> --- a/configs/colibri_imx6_defconfig
> +++ b/configs/colibri_imx6_defconfig
> @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
>  CONFIG_SPL_USB_HOST_SUPPORT=y
>  CONFIG_SPL_USB_GADGET=y
>  CONFIG_SPL_USB_SDP_SUPPORT=y
> +CONFIG_SPL_USB_STORAGE=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="Colibri iMX6 # "
>  CONFIG_CMD_BOOTZ=y
> diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
> index 1857c18..3532fce 100644
> --- a/configs/mx6sabresd_defconfig
> +++ b/configs/mx6sabresd_defconfig
> @@ -21,6 +21,7 @@ CONFIG_SPL_OS_BOOT=y
>  CONFIG_SPL_USB_HOST_SUPPORT=y
>  CONFIG_SPL_USB_GADGET=y
>  CONFIG_SPL_USB_SDP_SUPPORT=y
> +CONFIG_SPL_USB_STORAGE=y
>  CONFIG_SPL_WATCHDOG_SUPPORT=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> index 3b53bf2..4185e16 100644
> --- a/drivers/usb/Kconfig
> +++ b/drivers/usb/Kconfig
> @@ -89,6 +89,14 @@ config USB_STORAGE
>  	  Say Y here if you want to connect USB mass storage devices to your
>  	  board's USB port.
>  
> +config SPL_USB_STORAGE
> +	bool "SPL USB Mass Storage support"
> +	depends on !(SPL_BLK && !SPL_DM_USB)
> +	---help---
> +	  Say Y here if you want to connect USB mass storage devices to your
> +	  board's USB port in SPL.
> +
> +
>  config USB_KEYBOARD
>  	bool "USB Keyboard support"
>  	select SYS_STDIO_DEREGISTER
> 

-- 
Regards
Vignesh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 13:08 ` Vignesh R
@ 2019-01-15 15:42   ` Abel Vesa
  2019-01-16  4:33     ` Vignesh R
  0 siblings, 1 reply; 10+ messages in thread
From: Abel Vesa @ 2019-01-15 15:42 UTC (permalink / raw)
  To: u-boot

On 19-01-15 18:38:00, Vignesh R wrote:
> 
> 
> On 15/01/19 4:37 PM, 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 <abel.vesa@nxp.com>
> > ---
> >  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(-)
> 
> New config SPL_USB_STORAGE should be enabled for all boards that
> currently have CONFIG_SPL_USB_HOST_SUPPORT=y and CONFIG_USB_STORAGE=y
> right? I see that atleast configs/am43xx_evm_usbhost_boot_defconfig is
> not in the above list.
> 

As of commit ('d368926 Prepare v2019.01'), 

$ grep USB_STORAGE configs/am43xx_evm_usbhost_boot_defconfig
$ 

so it doesn't seem to be the case.

> Regards
> Vignesh
> 
> > 
> > diff --git a/common/Makefile b/common/Makefile
> > index 0de60b3..34931f3 100644
> > --- a/common/Makefile
> > +++ b/common/Makefile
> > @@ -77,7 +77,7 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
> >  
> >  ifdef CONFIG_SPL_USB_HOST_SUPPORT
> >  obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
> > -obj-$(CONFIG_USB_STORAGE) += usb_storage.o
> > +obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o
> >  else
> >  obj-$(CONFIG_USB_MUSB_HOST) += usb.o
> >  endif
> > diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
> > index e02d9bc..c4916ad 100644
> > --- a/configs/apalis_imx6_defconfig
> > +++ b/configs/apalis_imx6_defconfig
> > @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
> >  CONFIG_SPL_USB_HOST_SUPPORT=y
> >  CONFIG_SPL_USB_GADGET=y
> >  CONFIG_SPL_USB_SDP_SUPPORT=y
> > +CONFIG_SPL_USB_STORAGE=y
> >  CONFIG_HUSH_PARSER=y
> >  CONFIG_SYS_PROMPT="Apalis iMX6 # "
> >  CONFIG_CMD_BOOTZ=y
> > diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
> > index 68f0746..441a4e7 100644
> > --- a/configs/colibri_imx6_defconfig
> > +++ b/configs/colibri_imx6_defconfig
> > @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
> >  CONFIG_SPL_USB_HOST_SUPPORT=y
> >  CONFIG_SPL_USB_GADGET=y
> >  CONFIG_SPL_USB_SDP_SUPPORT=y
> > +CONFIG_SPL_USB_STORAGE=y
> >  CONFIG_HUSH_PARSER=y
> >  CONFIG_SYS_PROMPT="Colibri iMX6 # "
> >  CONFIG_CMD_BOOTZ=y
> > diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
> > index 1857c18..3532fce 100644
> > --- a/configs/mx6sabresd_defconfig
> > +++ b/configs/mx6sabresd_defconfig
> > @@ -21,6 +21,7 @@ CONFIG_SPL_OS_BOOT=y
> >  CONFIG_SPL_USB_HOST_SUPPORT=y
> >  CONFIG_SPL_USB_GADGET=y
> >  CONFIG_SPL_USB_SDP_SUPPORT=y
> > +CONFIG_SPL_USB_STORAGE=y
> >  CONFIG_SPL_WATCHDOG_SUPPORT=y
> >  CONFIG_HUSH_PARSER=y
> >  CONFIG_CMD_BOOTZ=y
> > diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> > index 3b53bf2..4185e16 100644
> > --- a/drivers/usb/Kconfig
> > +++ b/drivers/usb/Kconfig
> > @@ -89,6 +89,14 @@ config USB_STORAGE
> >  	  Say Y here if you want to connect USB mass storage devices to your
> >  	  board's USB port.
> >  
> > +config SPL_USB_STORAGE
> > +	bool "SPL USB Mass Storage support"
> > +	depends on !(SPL_BLK && !SPL_DM_USB)
> > +	---help---
> > +	  Say Y here if you want to connect USB mass storage devices to your
> > +	  board's USB port in SPL.
> > +
> > +
> >  config USB_KEYBOARD
> >  	bool "USB Keyboard support"
> >  	select SYS_STDIO_DEREGISTER
> > 
> 
> -- 
> Regards
> Vignesh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 11:07 [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper Abel Vesa
  2019-01-15 11:27 ` Marek Vasut
  2019-01-15 13:08 ` Vignesh R
@ 2019-01-15 16:02 ` Tom Rini
  2019-01-15 16:05   ` Abel Vesa
  2 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2019-01-15 16:02 UTC (permalink / raw)
  To: u-boot

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 <abel.vesa@nxp.com>
> ---
>  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
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/cb3701bd/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 16:02 ` Tom Rini
@ 2019-01-15 16:05   ` Abel Vesa
  2019-01-15 16:10     ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Abel Vesa @ 2019-01-15 16:05 UTC (permalink / raw)
  To: u-boot

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 <abel.vesa@nxp.com>
> > ---
> >  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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 16:05   ` Abel Vesa
@ 2019-01-15 16:10     ` Tom Rini
  2019-01-15 16:25       ` Abel Vesa
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2019-01-15 16:10 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 15, 2019 at 04:05:43PM +0000, Abel Vesa wrote:
> 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 <abel.vesa@nxp.com>
> > > ---
> > >  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
> 
> I think 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. 

No, you can't.  Or rather, the option names are a bit confusing.
CONFIG_SPL_USB_SUPPORT controls common/spl/spl_usb.c and that will not
function without CONFIG_USB_STORAGE support as it's specifically about
loading from a device.  It's also only set for some TI AM43xx platforms
as the ROM there supports booting from USB sticks and in turn we have
SPL doing so.  CONFIG_SPL_USB_HOST_SUPPORT is different and is set on
both AM43xx and various NXP platforms and is what you're after, without
the storage support side.

Aside, what is the USB host case on i.MX?  It's not acting in host mode
when being passed U-Boot via imx_usb, is it?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/0c8dbd71/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 16:10     ` Tom Rini
@ 2019-01-15 16:25       ` Abel Vesa
  0 siblings, 0 replies; 10+ messages in thread
From: Abel Vesa @ 2019-01-15 16:25 UTC (permalink / raw)
  To: u-boot

On 19-01-15 11:10:51, Tom Rini wrote:
> On Tue, Jan 15, 2019 at 04:05:43PM +0000, Abel Vesa wrote:
> > 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 <abel.vesa@nxp.com>
> > > > ---
> > > >  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
> > 
> > I think 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. 
> 
> No, you can't.  Or rather, the option names are a bit confusing.
> CONFIG_SPL_USB_SUPPORT controls common/spl/spl_usb.c and that will not
> function without CONFIG_USB_STORAGE support as it's specifically about
> loading from a device.  It's also only set for some TI AM43xx platforms
> as the ROM there supports booting from USB sticks and in turn we have
> SPL doing so.  CONFIG_SPL_USB_HOST_SUPPORT is different and is set on
> both AM43xx and various NXP platforms and is what you're after, without
> the storage support side.
> 
> Aside, what is the USB host case on i.MX?  It's not acting in host mode
> when being passed U-Boot via imx_usb, is it?

For imx_usb, SDP is used (CONFIG_SPL_USB_SDP_SUPPORT)
which is under CONFIG_SPL_USB_GADGET (not CONFIG_SPL_USB_SUPPORT
or CONFIG_SPL_USB_HOST_SUPPORT).

So you're right, CONFIG_SPL_USB_SUPPORT has nothing to do with SDP.


> 
> -- 
> Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper
  2019-01-15 15:42   ` Abel Vesa
@ 2019-01-16  4:33     ` Vignesh R
  0 siblings, 0 replies; 10+ messages in thread
From: Vignesh R @ 2019-01-16  4:33 UTC (permalink / raw)
  To: u-boot



On 15/01/19 9:12 PM, Abel Vesa wrote:
> On 19-01-15 18:38:00, Vignesh R wrote:
>>
>>
>> On 15/01/19 4:37 PM, 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 <abel.vesa@nxp.com>
>>> ---
>>>  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(-)
>>
>> New config SPL_USB_STORAGE should be enabled for all boards that
>> currently have CONFIG_SPL_USB_HOST_SUPPORT=y and CONFIG_USB_STORAGE=y
>> right? I see that atleast configs/am43xx_evm_usbhost_boot_defconfig is
>> not in the above list.
>>
> 
> As of commit ('d368926 Prepare v2019.01'), 
> 
> $ grep USB_STORAGE configs/am43xx_evm_usbhost_boot_defconfig
> $ 
> 
> so it doesn't seem to be the case.
> 

Ok, I see its removed as USB_STORAGE is implied for DISTRO_DEFAULTS.

toplevel Kconfig has:
config DISTRO_DEFAULTS
	...
        imply USB_STORAGE

So, you should probably add something like:
	imply SPL_USB_STORAGE if SPL_USB_HOST_SUPPORT

at all places where there is "imply USB_STORAGE" currently.

Regards
Vignesh


>>
>>>
>>> diff --git a/common/Makefile b/common/Makefile
>>> index 0de60b3..34931f3 100644
>>> --- a/common/Makefile
>>> +++ b/common/Makefile
>>> @@ -77,7 +77,7 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o
>>>  
>>>  ifdef CONFIG_SPL_USB_HOST_SUPPORT
>>>  obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
>>> -obj-$(CONFIG_USB_STORAGE) += usb_storage.o
>>> +obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o
>>>  else
>>>  obj-$(CONFIG_USB_MUSB_HOST) += usb.o
>>>  endif
>>> diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
>>> index e02d9bc..c4916ad 100644
>>> --- a/configs/apalis_imx6_defconfig
>>> +++ b/configs/apalis_imx6_defconfig
>>> @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
>>>  CONFIG_SPL_USB_HOST_SUPPORT=y
>>>  CONFIG_SPL_USB_GADGET=y
>>>  CONFIG_SPL_USB_SDP_SUPPORT=y
>>> +CONFIG_SPL_USB_STORAGE=y
>>>  CONFIG_HUSH_PARSER=y
>>>  CONFIG_SYS_PROMPT="Apalis iMX6 # "
>>>  CONFIG_CMD_BOOTZ=y
>>> diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
>>> index 68f0746..441a4e7 100644
>>> --- a/configs/colibri_imx6_defconfig
>>> +++ b/configs/colibri_imx6_defconfig
>>> @@ -25,6 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
>>>  CONFIG_SPL_USB_HOST_SUPPORT=y
>>>  CONFIG_SPL_USB_GADGET=y
>>>  CONFIG_SPL_USB_SDP_SUPPORT=y
>>> +CONFIG_SPL_USB_STORAGE=y
>>>  CONFIG_HUSH_PARSER=y
>>>  CONFIG_SYS_PROMPT="Colibri iMX6 # "
>>>  CONFIG_CMD_BOOTZ=y
>>> diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
>>> index 1857c18..3532fce 100644
>>> --- a/configs/mx6sabresd_defconfig
>>> +++ b/configs/mx6sabresd_defconfig
>>> @@ -21,6 +21,7 @@ CONFIG_SPL_OS_BOOT=y
>>>  CONFIG_SPL_USB_HOST_SUPPORT=y
>>>  CONFIG_SPL_USB_GADGET=y
>>>  CONFIG_SPL_USB_SDP_SUPPORT=y
>>> +CONFIG_SPL_USB_STORAGE=y
>>>  CONFIG_SPL_WATCHDOG_SUPPORT=y
>>>  CONFIG_HUSH_PARSER=y
>>>  CONFIG_CMD_BOOTZ=y
>>> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
>>> index 3b53bf2..4185e16 100644
>>> --- a/drivers/usb/Kconfig
>>> +++ b/drivers/usb/Kconfig
>>> @@ -89,6 +89,14 @@ config USB_STORAGE
>>>  	  Say Y here if you want to connect USB mass storage devices to your
>>>  	  board's USB port.
>>>  
>>> +config SPL_USB_STORAGE
>>> +	bool "SPL USB Mass Storage support"
>>> +	depends on !(SPL_BLK && !SPL_DM_USB)
>>> +	---help---
>>> +	  Say Y here if you want to connect USB mass storage devices to your
>>> +	  board's USB port in SPL.
>>> +
>>> +
>>>  config USB_KEYBOARD
>>>  	bool "USB Keyboard support"
>>>  	select SYS_STDIO_DEREGISTER
>>>
>>
>> -- 
>> Regards
>> Vignesh

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-16  4:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 11:07 [U-Boot] [PATCH] common: Break USB_STORAGE dependency between SPL and u-boot proper Abel Vesa
2019-01-15 11:27 ` Marek Vasut
2019-01-15 12:17   ` Abel Vesa
2019-01-15 13:08 ` Vignesh R
2019-01-15 15:42   ` Abel Vesa
2019-01-16  4:33     ` Vignesh R
2019-01-15 16:02 ` Tom Rini
2019-01-15 16:05   ` Abel Vesa
2019-01-15 16:10     ` Tom Rini
2019-01-15 16:25       ` Abel Vesa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.