Skip to contentSkip to conversation

usb: gadget: Handle SPL_* configs

PATCH New Nathan Rossi 2 participants 7 messages Jan 27, 2020 – Feb 26, 2020 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: Handle SPL_* configs

Handle selection of objects based on $(SPL_) to allow for normal and SPL builds to have differing object compilation.

---
 drivers/usb/gadget/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/gadget/Makefile +4 -4
index 70f3bf43e7..8967745513 100644
@@ -3,8 +3,8 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
-obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_GADGET) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_ETHER) += epautoconf.o config.o usbstring.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
 
 # new USB gadget layer dependencies
-ifdef CONFIG_USB_GADGET
+ifdef CONFIG_$(SPL_)USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
@@ -31,7 +31,7 @@ obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
 obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
+ifdef CONFIG_$(SPL_)USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 obj-$(CONFIG_CI_UDC)	+= ci_udc.o

---
2.24.1

#1 lore raw

PATCH 1/1 usb: gadget: Handle SPL_* configs

Hi Nathan,

Quoted 2 lines

Handle selection of objects based on $(SPL_) to allow for normal and SPL builds to have differing object compilation.

Could you share the exact use case? I do guess that you want to add some gadget(s) to SPL?

(Such changes may cause issues on boards already using this feature - could you run:

./tools/buildman/buildman.py --branch=HEAD siemens samsung bbb --detail --verbose --show_errors --force-build --count=1 --output-dir=./BUILD/

Quoted 40 lines
---
 drivers/usb/gadget/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/gadget/Makefile +4 -5
index 70f3bf43e7..8967745513 100644
@@ -3,8 +3,8 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
-obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_GADGET) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_ETHER) += epautoconf.o config.o usbstring.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
 
 # new USB gadget layer dependencies
-ifdef CONFIG_USB_GADGET
+ifdef CONFIG_$(SPL_)USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
@@ -31,7 +31,7 @@ obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
 obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
+ifdef CONFIG_$(SPL_)USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 obj-$(CONFIG_CI_UDC)	+= ci_udc.o
---
Quoted 1 line

2.24.1

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200127/6a0866d3/attachment.sig>

#2 lore raw

PATCH 1/1 usb: gadget: Handle SPL_* configs

Quoted 8 lines · Lukasz Majewski

Hi Nathan,

Quoted 2 lines

Handle selection of objects based on $(SPL_) to allow for normal and SPL builds to have differing object compilation.

Could you share the exact use case? I do guess that you want to add some gadget(s) to SPL?

I am primarily trying to disable SPL_ENV_SUPPORT for beaglebone (am335x_evm). SPL_USB_ETHER has a dependency on SPL_ENV_SUPPORT, thus the desire to disable it (whilst leaving SPL_USB_GADGET enabled).

Quoted 7 lines

(Such changes may cause issues on boards already using this feature - could you run:

./tools/buildman/buildman.py --branch=HEAD siemens samsung bbb --detail --verbose --show_errors --force-build --count=1 --output-dir=./BUILD/

Running this showed no regressions. Also I noticed "bbb" does not refer to any boards?

Thanks,
Nathan

Quoted 57 lines
Quoted 43 lines
---
 drivers/usb/gadget/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/gadget/Makefile +4 -5
index 70f3bf43e7..8967745513 100644
@@ -3,8 +3,8 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
-obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_GADGET) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_ETHER) += epautoconf.o config.o usbstring.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
 
 # new USB gadget layer dependencies
-ifdef CONFIG_USB_GADGET
+ifdef CONFIG_$(SPL_)USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
@@ -31,7 +31,7 @@ obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
 obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
+ifdef CONFIG_$(SPL_)USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 obj-$(CONFIG_CI_UDC) += ci_udc.o
---
Quoted 1 line

2.24.1

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de

#3 lore raw

PATCH 1/1 usb: gadget: Handle SPL_* configs

Quoted 7 lines · On Tue, 28 Jan 2020 17:50:03 +1000 Nathan Rossi <[email protected]> wrote:
Quoted 6 lines · Lukasz Majewski

Hi Nathan,

Quoted 2 lines

Handle selection of objects based on $(SPL_) to allow for normal and SPL builds to have differing object compilation.

Quoted 6 lines
Quoted 2 lines

Could you share the exact use case? I do guess that you want to add some gadget(s) to SPL?

I am primarily trying to disable SPL_ENV_SUPPORT for beaglebone (am335x_evm). SPL_USB_ETHER has a dependency on SPL_ENV_SUPPORT, thus the desire to disable it (whilst leaving SPL_USB_GADGET enabled).

Ok.

Quoted 11 lines
Quoted 8 lines

(Such changes may cause issues on boards already using this feature
- could you run:

./tools/buildman/buildman.py --branch=HEAD siemens samsung bbb --detail --verbose --show_errors --force-build --count=1 --output-dir=./BUILD/

Running this showed no regressions. Also I noticed "bbb" does not refer to any boards?

I see. Then please try am335x instead.

Quoted 63 lines

Thanks,
Nathan

Quoted 59 lines
Quoted 44 lines
---
 drivers/usb/gadget/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/Makefile index 70f3bf43e7..8967745513 100644

drivers/usb/gadget/Makefile +1 -2
@@ -3,8 +3,8 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
-obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_GADGET) += epautoconf.o config.o

usbstring.o +obj-$(CONFIG_$(SPL_)USB_ETHER) += epautoconf.o config.o usbstring.o

ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o

drivers/usb/gadget/Makefile +2 -3
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
 
 # new USB gadget layer dependencies
-ifdef CONFIG_USB_GADGET
+ifdef CONFIG_$(SPL_)USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
@@ -31,7 +31,7 @@ obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
 obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
+ifdef CONFIG_$(SPL_)USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 obj-$(CONFIG_CI_UDC) += ci_udc.o
---
Quoted 1 line

2.24.1

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
lukma at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200128/df514f9c/attachment.sig>

#4 lore raw

PATCH 1/1 usb: gadget: Handle SPL_* configs

Quoted 25 lines · Lukasz Majewski
Quoted 7 lines · On Tue, 28 Jan 2020 17:50:03 +1000 Nathan Rossi <[email protected]> wrote:
Quoted 6 lines · Lukasz Majewski

Hi Nathan,

Quoted 2 lines

Handle selection of objects based on $(SPL_) to allow for normal and SPL builds to have differing object compilation.

Quoted 6 lines
Quoted 2 lines

Could you share the exact use case? I do guess that you want to add some gadget(s) to SPL?

I am primarily trying to disable SPL_ENV_SUPPORT for beaglebone (am335x_evm). SPL_USB_ETHER has a dependency on SPL_ENV_SUPPORT, thus the desire to disable it (whilst leaving SPL_USB_GADGET enabled).

Ok.

Quoted 5 lines
Quoted 5 lines

(Such changes may cause issues on boards already using this feature
- could you run:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

./tools/buildman/buildman.py --branch=HEAD siemens samsung bbb --detail --verbose --show_errors --force-build --count=1 --output-dir=./BUILD/

Running this showed no regressions. Also I noticed "bbb" does not refer to any boards?

I see. Then please try am335x instead.

There are no regressions for those boards either.

Regards,
Nathan

Quoted 77 lines
Quoted 64 lines

Thanks,
Nathan

Quoted 59 lines
Quoted 44 lines
---
 drivers/usb/gadget/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/Makefile index 70f3bf43e7..8967745513 100644

drivers/usb/gadget/Makefile +1 -2
@@ -3,8 +3,8 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
-obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_GADGET) += epautoconf.o config.o

usbstring.o +obj-$(CONFIG_$(SPL_)USB_ETHER) += epautoconf.o config.o usbstring.o

ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o

drivers/usb/gadget/Makefile +2 -3
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
 
 # new USB gadget layer dependencies
-ifdef CONFIG_USB_GADGET
+ifdef CONFIG_$(SPL_)USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
@@ -31,7 +31,7 @@ obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
 obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
+ifdef CONFIG_$(SPL_)USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 obj-$(CONFIG_CI_UDC) += ci_udc.o
---
Quoted 1 line

2.24.1

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
lukma at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de

#5 lore raw

PATCH 1/1 usb: gadget: Handle SPL_* configs

Hi Nathan,

Quoted 33 lines · Lukasz Majewski
Quoted 32 lines
Quoted 8 lines · On Tue, 28 Jan 2020 17:50:03 +1000 Nathan Rossi <[email protected]> wrote:
Quoted 6 lines · Lukasz Majewski

Hi Nathan,

Quoted 2 lines

Handle selection of objects based on $(SPL_) to allow for normal and SPL builds to have differing object compilation.

Quoted 7 lines
Quoted 2 lines

Could you share the exact use case? I do guess that you want to add some gadget(s) to SPL?

I am primarily trying to disable SPL_ENV_SUPPORT for beaglebone (am335x_evm). SPL_USB_ETHER has a dependency on SPL_ENV_SUPPORT, thus the desire to disable it (whilst leaving SPL_USB_GADGET enabled).

Ok.

Quoted 10 lines
Quoted 9 lines

(Such changes may cause issues on boards already using this feature
- could you run:

./tools/buildman/buildman.py --branch=HEAD siemens samsung bbb --detail --verbose --show_errors --force-build --count=1 --output-dir=./BUILD/

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Running this showed no regressions. Also I noticed "bbb" does not refer to any boards?

I see. Then please try am335x instead.

There are no regressions for those boards either.

I did some tests before pulling:

-master branch u-boot
SHA1: f2a73d6867ef973fbb8471cc87058205999b5e5c

./tools/buildman/buildman.py --branch=HEAD am43xx_evm_usbhost_boot am335x --show_errors --force-build --verbose --count=1 --output-dir=../BUILD/

arm: + am43xx_evm_usbhost_boot
+../drivers/usb/gadget/ether.c: In function ?usb_eth_probe?:
+../drivers/usb/gadget/ether.c:2654:17: error: ?CONFIG_USBNET_DEVADDR? undeclared (first use in this function)
+ get_ether_addr(CONFIG_USBNET_DEVADDR, pdata->enetaddr);
+ ^~~~~~~~~~~~~~~~~~~~~

Could you fix it and repost the patch?

Quoted 82 lines

Regards,
Nathan

Quoted 78 lines
Quoted 64 lines

Thanks,
Nathan

Quoted 59 lines
Quoted 44 lines
---
 drivers/usb/gadget/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/Makefile index 70f3bf43e7..8967745513 100644 --- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile

drivers/usb/gadget/Makefile +1 -2
@@ -3,8 +3,8 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
-obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_GADGET) += epautoconf.o config.o

usbstring.o +obj-$(CONFIG_$(SPL_)USB_ETHER) += epautoconf.o config.o usbstring.o

ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o

drivers/usb/gadget/Makefile +2 -3
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
 
 # new USB gadget layer dependencies
-ifdef CONFIG_USB_GADGET
+ifdef CONFIG_$(SPL_)USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
@@ -31,7 +31,7 @@ obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
 obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
+ifdef CONFIG_$(SPL_)USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 obj-$(CONFIG_CI_UDC) += ci_udc.o
---
Quoted 1 line

2.24.1

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
(+49)-8142-66989-80 Email: lukma at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
lukma at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200221/0d7f0dbd/attachment.sig>

#6 lore raw

PATCH 1/1 usb: gadget: Handle SPL_* configs

Quoted 59 lines · Lukasz Majewski

Hi Nathan,

Quoted 33 lines · Lukasz Majewski
Quoted 32 lines
Quoted 8 lines · On Tue, 28 Jan 2020 17:50:03 +1000 Nathan Rossi <[email protected]> wrote:
Quoted 6 lines · Lukasz Majewski

Hi Nathan,

Quoted 2 lines

Handle selection of objects based on $(SPL_) to allow for normal and SPL builds to have differing object compilation.

Quoted 7 lines
Quoted 2 lines

Could you share the exact use case? I do guess that you want to add some gadget(s) to SPL?

I am primarily trying to disable SPL_ENV_SUPPORT for beaglebone (am335x_evm). SPL_USB_ETHER has a dependency on SPL_ENV_SUPPORT, thus the desire to disable it (whilst leaving SPL_USB_GADGET enabled).

Ok.

Quoted 10 lines
Quoted 9 lines

(Such changes may cause issues on boards already using this feature
- could you run:

./tools/buildman/buildman.py --branch=HEAD siemens samsung bbb --detail --verbose --show_errors --force-build --count=1 --output-dir=./BUILD/

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Running this showed no regressions. Also I noticed "bbb" does not refer to any boards?

I see. Then please try am335x instead.

There are no regressions for those boards either.

I did some tests before pulling:

-master branch u-boot
SHA1: f2a73d6867ef973fbb8471cc87058205999b5e5c

./tools/buildman/buildman.py --branch=HEAD am43xx_evm_usbhost_boot am335x --show_errors --force-build --verbose --count=1 --output-dir=../BUILD/

arm: + am43xx_evm_usbhost_boot
+../drivers/usb/gadget/ether.c: In function ?usb_eth_probe?:
+../drivers/usb/gadget/ether.c:2654:17: error: ?CONFIG_USBNET_DEVADDR? undeclared (first use in this function)

(quoted diff) +2 -0
+  get_ether_addr(CONFIG_USBNET_DEVADDR, pdata->enetaddr);
+                 ^~~~~~~~~~~~~~~~~~~~~
Quoted 1 line

Could you fix it and repost the patch?

It appears I may have misunderstood the purpose of CONFIG_SPL_USB_ETHER. But more importantly it is not used consistently. According to the Kconfig it is to enable "USB ethernet drivers" (e.g. a USB ethernet dongle, aka CONFIG_USB_HOST_ETHER), however it is contained within a if SPL_USB_GADGET block. Some parts of U-Boot such as drivers/Makefile use this to enable net/phy but this is the only clear example of the USB_HOST_ETHER equivalent. Whilst others use it to enable configuration for USB ethernet gadget (e.g. spl_net.c).

If the config indeed does refer to an SPL_ equivalent of USB_ETHER there are some issues with its use when USB_ETHER is not configured as well, which causes the error above since CONFIG_USBNET_DEVADDR is not defined otherwise. This can be resolved by keeping the CONFIG_USBNET_* options common for both normal and spl, and having the Kconfig reflect that. This would also apply to the USB_ETH_RNDIS/CDC choice too.

Though the am43xx_evm_usbhost_boot board might instead be setting CONFIG_SPL_USB_ETHER for USB_HOST_ETHER?

Regards,
Nathan

Quoted 96 lines
Quoted 83 lines

Regards,
Nathan

Quoted 78 lines
Quoted 64 lines

Thanks,
Nathan

Quoted 59 lines
Quoted 44 lines
---
 drivers/usb/gadget/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/Makefile index 70f3bf43e7..8967745513 100644 --- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile

drivers/usb/gadget/Makefile +1 -2
@@ -3,8 +3,8 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
-obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
+obj-$(CONFIG_$(SPL_)USB_GADGET) += epautoconf.o config.o

usbstring.o +obj-$(CONFIG_$(SPL_)USB_ETHER) += epautoconf.o config.o usbstring.o

ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o

drivers/usb/gadget/Makefile +2 -3
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
 
 # new USB gadget layer dependencies
-ifdef CONFIG_USB_GADGET
+ifdef CONFIG_$(SPL_)USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
@@ -31,7 +31,7 @@ obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
 obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 endif
 endif
-ifdef CONFIG_USB_ETHER
+ifdef CONFIG_$(SPL_)USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 obj-$(CONFIG_CI_UDC) += ci_udc.o
---
Quoted 1 line

2.24.1

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
(+49)-8142-66989-80 Email: lukma at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
lukma at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de