Skip to contentSkip to conversation

CONFIG_DM_USB breakage on sunxi boards with musb?

U-Boot Priit Laes 3 participants 7 messages Dec 19, 2018 – Dec 21, 2018 USB

lore
Share & tools
lore

Priit Laes

author
#0 lore raw

Heya!

I ran into following error when trying to fel-boot A20 OLinuxino Lime2 eMMC board with latest u-boot:

[snip]
U-Boot 2019.01-rc2-00005-gbf60dae9dd (Dec 19 2018 - 09:47:08 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB

Error binding driver 'sunxi-musb': -96
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -96 Some drivers failed to bind
initcall sequence 7efbdfc8 failed at call 4a00d07b (err=-96) ### ERROR ### Please RESET the board ###
[/snip]

Could it be caused by a side effect of the upcoming CONFIG_DM_USB changes?

Priit

#1 lore raw
Quoted 22 lines · Priit Laes

Heya!

I ran into following error when trying to fel-boot A20 OLinuxino Lime2 eMMC board with latest u-boot:

[snip]
U-Boot 2019.01-rc2-00005-gbf60dae9dd (Dec 19 2018 - 09:47:08 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB

Error binding driver 'sunxi-musb': -96
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -96 Some drivers failed to bind
initcall sequence 7efbdfc8 failed at call 4a00d07b (err=-96) ### ERROR ### Please RESET the board ###
[/snip]

Quoted 2 lines

Could it be caused by a side effect of the upcoming CONFIG_DM_USB changes?

No, board file change wrt this commit 0131162439508801b9f8a330fa731f04273c9337

Need to figure out.

author
#2 lore raw
Quoted 23 lines · Jagan Teki
Quoted 22 lines · Priit Laes

Heya!

I ran into following error when trying to fel-boot A20 OLinuxino Lime2 eMMC board with latest u-boot:

[snip]
U-Boot 2019.01-rc2-00005-gbf60dae9dd (Dec 19 2018 - 09:47:08 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB

Error binding driver 'sunxi-musb': -96
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -96 Some drivers failed to bind
initcall sequence 7efbdfc8 failed at call 4a00d07b (err=-96) ### ERROR ### Please RESET the board ###
[/snip]

Quoted 6 lines
Quoted 2 lines

Could it be caused by a side effect of the upcoming CONFIG_DM_USB changes?

No, board file change wrt this commit 0131162439508801b9f8a330fa731f04273c9337

Need to figure out.

Yup, bisecting points to the same commit and reverting fixes the issue.

0131162439508801b9f8a330fa731f04273c9337 is the first bad commit commit 0131162439508801b9f8a330fa731f04273c9337

Author: Jean-Jacques Hiblot <[email protected]>
Date:   Thu Nov 29 10:52:46 2018 +0100

dm: usb: create a new UCLASS ID for USB gadget devices

UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.

Also move the generic DM code for USB gadgets in a separate file for clarity.

:040000 040000 5223a6058a0c4a1e877f32355c947d4a607fef1b d3f89658db63ec26d887163740cf5d974dd2c0e5 M board
:040000 040000 67c4404917ada478595b408d7747a6f5c17c0c99 8c67ea39df65e4e982d9b9eeb984d66678a33fc8 M drivers
:040000 040000 89243fd62729e128489d80e206db4fa9b946dc99 16783bd1f210ae3454255cb1c4eaa05fe7eaa6ed M include

$ git bisect log
git bisect start
# bad: [058701534ffde8032649ba8421a0428959519b79] WIP
git bisect bad 058701534ffde8032649ba8421a0428959519b79
# bad: [d94604d558cda9f89722c967d6f8d6269a2db21c] Merge tag 'fsl-qoriq-for-v2019.01-rc2' of git://git.denx.de/u-boot-fsl-qoriq
git bisect bad d94604d558cda9f89722c967d6f8d6269a2db21c
# good: [c49aff3e66b930aa06936afee401cf5e19377958] Merge branch 'master' of git://git.denx.de/u-boot-sunxi
git bisect good c49aff3e66b930aa06936afee401cf5e19377958
# bad: [7ff485c68b7e5573e5a4a877066e98398283a24f] Merge branch 'master' of git://git.denx.de/u-boot-i2c
git bisect bad 7ff485c68b7e5573e5a4a877066e98398283a24f
# good: [19f8c4dfb6e744a31da59bdd23b24d144152f1dc] cmd: i2c: Fix help output of i2c command.
git bisect good 19f8c4dfb6e744a31da59bdd23b24d144152f1dc
# bad: [b491afa0f3c0df88027b08f18934cc034c40d659] configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
git bisect bad b491afa0f3c0df88027b08f18934cc034c40d659
# bad: [93991cf1969077108ae36e90acb3cd25a6a449ac] dwc3-generic: Add select_dr_mode operation
git bisect bad 93991cf1969077108ae36e90acb3cd25a6a449ac
# good: [20bebd866690bb09dd1c1cb8ac674c3b17b63c6d] dwc3_generic: do not probe the USB device driver when it's bound
git bisect good 20bebd866690bb09dd1c1cb8ac674c3b17b63c6d
# bad: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
git bisect bad 0131162439508801b9f8a330fa731f04273c9337
# good: [d648a50c0a27452a5439e7982b23b97c64820430] dwc3: move phy operation to core.c
git bisect good d648a50c0a27452a5439e7982b23b97c64820430
# first bad commit: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
Quoted 5 lines
Signature · 4 lines
-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#3 lore raw
Quoted 23 lines · Priit Laes
Quoted 22 lines · Jagan Teki
Quoted 21 lines · Priit Laes

Heya!

I ran into following error when trying to fel-boot A20 OLinuxino Lime2 eMMC board with latest u-boot:

[snip]
U-Boot 2019.01-rc2-00005-gbf60dae9dd (Dec 19 2018 - 09:47:08 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB

Error binding driver 'sunxi-musb': -96
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -96 Some drivers failed to bind
initcall sequence 7efbdfc8 failed at call 4a00d07b (err=-96) ### ERROR ### Please RESET the board ###
[/snip]

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Could it be caused by a side effect of the upcoming CONFIG_DM_USB changes?

No, board file change wrt this commit 0131162439508801b9f8a330fa731f04273c9337

Need to figure out.

Yup, bisecting points to the same commit and reverting fixes the issue.

Can you try with  DM_USB_GADGET enabled?

Quoted 50 lines

0131162439508801b9f8a330fa731f04273c9337 is the first bad commit commit 0131162439508801b9f8a330fa731f04273c9337

Author: Jean-Jacques Hiblot <[email protected]>
Date:   Thu Nov 29 10:52:46 2018 +0100

dm: usb: create a new UCLASS ID for USB gadget devices

UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.

Also move the generic DM code for USB gadgets in a separate file for clarity.

:040000 040000 5223a6058a0c4a1e877f32355c947d4a607fef1b d3f89658db63ec26d887163740cf5d974dd2c0e5 M board
:040000 040000 67c4404917ada478595b408d7747a6f5c17c0c99 8c67ea39df65e4e982d9b9eeb984d66678a33fc8 M drivers
:040000 040000 89243fd62729e128489d80e206db4fa9b946dc99 16783bd1f210ae3454255cb1c4eaa05fe7eaa6ed M include

$ git bisect log
git bisect start
# bad: [058701534ffde8032649ba8421a0428959519b79] WIP
git bisect bad 058701534ffde8032649ba8421a0428959519b79
# bad: [d94604d558cda9f89722c967d6f8d6269a2db21c] Merge tag 'fsl-qoriq-for-v2019.01-rc2' of git://git.denx.de/u-boot-fsl-qoriq
git bisect bad d94604d558cda9f89722c967d6f8d6269a2db21c
# good: [c49aff3e66b930aa06936afee401cf5e19377958] Merge branch 'master' of git://git.denx.de/u-boot-sunxi
git bisect good c49aff3e66b930aa06936afee401cf5e19377958
# bad: [7ff485c68b7e5573e5a4a877066e98398283a24f] Merge branch 'master' of git://git.denx.de/u-boot-i2c
git bisect bad 7ff485c68b7e5573e5a4a877066e98398283a24f
# good: [19f8c4dfb6e744a31da59bdd23b24d144152f1dc] cmd: i2c: Fix help output of i2c command.
git bisect good 19f8c4dfb6e744a31da59bdd23b24d144152f1dc
# bad: [b491afa0f3c0df88027b08f18934cc034c40d659] configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
git bisect bad b491afa0f3c0df88027b08f18934cc034c40d659
# bad: [93991cf1969077108ae36e90acb3cd25a6a449ac] dwc3-generic: Add select_dr_mode operation
git bisect bad 93991cf1969077108ae36e90acb3cd25a6a449ac
# good: [20bebd866690bb09dd1c1cb8ac674c3b17b63c6d] dwc3_generic: do not probe the USB device driver when it's bound
git bisect good 20bebd866690bb09dd1c1cb8ac674c3b17b63c6d
# bad: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
git bisect bad 0131162439508801b9f8a330fa731f04273c9337
# good: [d648a50c0a27452a5439e7982b23b97c64820430] dwc3: move phy operation to core.c
git bisect good d648a50c0a27452a5439e7982b23b97c64820430
# first bad commit: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
Quoted 4 lines
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
author
#4 lore raw
Quoted 25 lines · Jean-Jacques Hiblot
Quoted 23 lines · Priit Laes
Quoted 22 lines · Jagan Teki
Quoted 21 lines · Priit Laes

Heya!

I ran into following error when trying to fel-boot A20 OLinuxino Lime2 eMMC board with latest u-boot:

[snip]
U-Boot 2019.01-rc2-00005-gbf60dae9dd (Dec 19 2018 - 09:47:08 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB

Error binding driver 'sunxi-musb': -96
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -96 Some drivers failed to bind
initcall sequence 7efbdfc8 failed at call 4a00d07b (err=-96) ### ERROR ### Please RESET the board ###
[/snip]

Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Could it be caused by a side effect of the upcoming CONFIG_DM_USB changes?

No, board file change wrt this commit 0131162439508801b9f8a330fa731f04273c9337

Need to figure out.

Yup, bisecting points to the same commit and reverting fixes the issue.

Can you try with  DM_USB_GADGET enabled?

Yes, the result is:

drivers/usb/gadget/udc/udc-uclass.c:52: undefined reference to `dm_usb_gadget_handle_interrupts

u-boot configuration file is A20-OLinuXino-Lime2-eMMC_defconfig

Quoted 49 lines
Quoted 49 lines

0131162439508801b9f8a330fa731f04273c9337 is the first bad commit commit 0131162439508801b9f8a330fa731f04273c9337

Author: Jean-Jacques Hiblot <[email protected]>
Date:   Thu Nov 29 10:52:46 2018 +0100

dm: usb: create a new UCLASS ID for USB gadget devices UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.
Also move the generic DM code for USB gadgets in a separate file for clarity.

:040000 040000 5223a6058a0c4a1e877f32355c947d4a607fef1b d3f89658db63ec26d887163740cf5d974dd2c0e5 M board
:040000 040000 67c4404917ada478595b408d7747a6f5c17c0c99 8c67ea39df65e4e982d9b9eeb984d66678a33fc8 M drivers
:040000 040000 89243fd62729e128489d80e206db4fa9b946dc99 16783bd1f210ae3454255cb1c4eaa05fe7eaa6ed M include

$ git bisect log
git bisect start
# bad: [058701534ffde8032649ba8421a0428959519b79] WIP
git bisect bad 058701534ffde8032649ba8421a0428959519b79
# bad: [d94604d558cda9f89722c967d6f8d6269a2db21c] Merge tag 'fsl-qoriq-for-v2019.01-rc2' of git://git.denx.de/u-boot-fsl-qoriq
git bisect bad d94604d558cda9f89722c967d6f8d6269a2db21c
# good: [c49aff3e66b930aa06936afee401cf5e19377958] Merge branch 'master' of git://git.denx.de/u-boot-sunxi
git bisect good c49aff3e66b930aa06936afee401cf5e19377958
# bad: [7ff485c68b7e5573e5a4a877066e98398283a24f] Merge branch 'master' of git://git.denx.de/u-boot-i2c
git bisect bad 7ff485c68b7e5573e5a4a877066e98398283a24f
# good: [19f8c4dfb6e744a31da59bdd23b24d144152f1dc] cmd: i2c: Fix help output of i2c command.
git bisect good 19f8c4dfb6e744a31da59bdd23b24d144152f1dc
# bad: [b491afa0f3c0df88027b08f18934cc034c40d659] configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
git bisect bad b491afa0f3c0df88027b08f18934cc034c40d659
# bad: [93991cf1969077108ae36e90acb3cd25a6a449ac] dwc3-generic: Add select_dr_mode operation
git bisect bad 93991cf1969077108ae36e90acb3cd25a6a449ac
# good: [20bebd866690bb09dd1c1cb8ac674c3b17b63c6d] dwc3_generic: do not probe the USB device driver when it's bound
git bisect good 20bebd866690bb09dd1c1cb8ac674c3b17b63c6d
# bad: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
git bisect bad 0131162439508801b9f8a330fa731f04273c9337
# good: [d648a50c0a27452a5439e7982b23b97c64820430] dwc3: move phy operation to core.c
git bisect good d648a50c0a27452a5439e7982b23b97c64820430
# first bad commit: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
Quoted 4 lines
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#5 lore raw
Quoted 29 lines · Priit Laes
Quoted 28 lines · Jean-Jacques Hiblot
Quoted 27 lines · Priit Laes
Quoted 26 lines · Jagan Teki
Quoted 21 lines · Priit Laes

Heya!

I ran into following error when trying to fel-boot A20 OLinuxino Lime2 eMMC board with latest u-boot:

[snip]
U-Boot 2019.01-rc2-00005-gbf60dae9dd (Dec 19 2018 - 09:47:08 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB

Error binding driver 'sunxi-musb': -96
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -96 Some drivers failed to bind
initcall sequence 7efbdfc8 failed at call 4a00d07b (err=-96) ### ERROR ### Please RESET the board ###
[/snip]

Quoted 2 lines

Could it be caused by a side effect of the upcoming CONFIG_DM_USB changes?

No, board file change wrt this commit 0131162439508801b9f8a330fa731f04273c9337

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line

Need to figure out.

Yup, bisecting points to the same commit and reverting fixes the issue.

Can you try with  DM_USB_GADGET enabled?

Yes, the result is:

drivers/usb/gadget/udc/udc-uclass.c:52: undefined reference to `dm_usb_gadget_handle_interrupts

u-boot configuration file is A20-OLinuXino-Lime2-eMMC_defconfig

Thanks for testing.

Can you try with the following modifications?

It should provide the missing  UCLASS_DRIVER() without having to enable DM_USB_GADGET.

If that fixes your problem, I'll run it through buildman and submit a proper the patch.

(quoted diff) +0 -0

b/drivers/usb/gadget/udc/Makefile
index 38ac2dd..73cf84f 100644

drivers/usb/gadget/udc/Makefile +3 -1
@@ -6,4 +6,6 @@ ifndef CONFIG_$(SPL_)DM_USB_GADGET
  obj-$(CONFIG_USB_DWC3_GADGET)  += udc-core.o
  endif
 
-obj-$(CONFIG_$(SPL_)DM_USB_GADGET)     += udc-uclass.o udc-core.o
+obj-$(CONFIG_$(SPL_)DM_USB_GADGET)     += udc-core.o
+obj-$(CONFIG_$(SPL_)DM) += udc-uclass.o
+
(quoted diff) +0 -0

b/drivers/usb/gadget/udc/udc-uclass.c
index e9f8f5f..8d78647 100644

drivers/usb/gadget/udc/udc-uclass.c +2 -0
@@ -9,6 +9,7 @@
  #include <dm/device-internal.h>
  #include <linux/usb/gadget.h>
 
+#if CONFIG_IS_ENABLED(DM_USB_GADGET)
  #define MAX_UDC_DEVICES 4
  static struct udevice *dev_array[MAX_UDC_DEVICES];
  int usb_gadget_initialize(int index)
@@ -51,6 +52,7 @@ int usb_gadget_handle_interrupts(int index)
                 return -EINVAL;
         return dm_usb_gadget_handle_interrupts(dev_array[index]);
  }
+#endif
 
  UCLASS_DRIVER(usb_gadget_generic) = {
         .id             = UCLASS_USB_GADGET_GENERIC,
Quoted 48 lines
Quoted 48 lines
Quoted 48 lines

0131162439508801b9f8a330fa731f04273c9337 is the first bad commit commit 0131162439508801b9f8a330fa731f04273c9337

Author: Jean-Jacques Hiblot <[email protected]>
Date:   Thu Nov 29 10:52:46 2018 +0100

dm: usb: create a new UCLASS ID for USB gadget devices UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.
Also move the generic DM code for USB gadgets in a separate file for clarity.

:040000 040000 5223a6058a0c4a1e877f32355c947d4a607fef1b d3f89658db63ec26d887163740cf5d974dd2c0e5 M board
:040000 040000 67c4404917ada478595b408d7747a6f5c17c0c99 8c67ea39df65e4e982d9b9eeb984d66678a33fc8 M drivers
:040000 040000 89243fd62729e128489d80e206db4fa9b946dc99 16783bd1f210ae3454255cb1c4eaa05fe7eaa6ed M include

$ git bisect log
git bisect start
# bad: [058701534ffde8032649ba8421a0428959519b79] WIP
git bisect bad 058701534ffde8032649ba8421a0428959519b79
# bad: [d94604d558cda9f89722c967d6f8d6269a2db21c] Merge tag 'fsl-qoriq-for-v2019.01-rc2' of git://git.denx.de/u-boot-fsl-qoriq
git bisect bad d94604d558cda9f89722c967d6f8d6269a2db21c
# good: [c49aff3e66b930aa06936afee401cf5e19377958] Merge branch 'master' of git://git.denx.de/u-boot-sunxi
git bisect good c49aff3e66b930aa06936afee401cf5e19377958
# bad: [7ff485c68b7e5573e5a4a877066e98398283a24f] Merge branch 'master' of git://git.denx.de/u-boot-i2c
git bisect bad 7ff485c68b7e5573e5a4a877066e98398283a24f
# good: [19f8c4dfb6e744a31da59bdd23b24d144152f1dc] cmd: i2c: Fix help output of i2c command.
git bisect good 19f8c4dfb6e744a31da59bdd23b24d144152f1dc
# bad: [b491afa0f3c0df88027b08f18934cc034c40d659] configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
git bisect bad b491afa0f3c0df88027b08f18934cc034c40d659
# bad: [93991cf1969077108ae36e90acb3cd25a6a449ac] dwc3-generic: Add select_dr_mode operation
git bisect bad 93991cf1969077108ae36e90acb3cd25a6a449ac
# good: [20bebd866690bb09dd1c1cb8ac674c3b17b63c6d] dwc3_generic: do not probe the USB device driver when it's bound
git bisect good 20bebd866690bb09dd1c1cb8ac674c3b17b63c6d
# bad: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
git bisect bad 0131162439508801b9f8a330fa731f04273c9337
# good: [d648a50c0a27452a5439e7982b23b97c64820430] dwc3: move phy operation to core.c
git bisect good d648a50c0a27452a5439e7982b23b97c64820430
# first bad commit: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
Quoted 4 lines
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
author Tested-by
#6 lore raw
Quoted 36 lines · Jean-Jacques Hiblot
Quoted 34 lines · Priit Laes
Quoted 24 lines · Jean-Jacques Hiblot
Quoted 23 lines · Priit Laes
Quoted 22 lines · Jagan Teki
Quoted 21 lines · Priit Laes

Heya!

I ran into following error when trying to fel-boot A20 OLinuxino Lime2 eMMC board with latest u-boot:

[snip]
U-Boot 2019.01-rc2-00005-gbf60dae9dd (Dec 19 2018 - 09:47:08 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2-eMMC
I2C:   ready
DRAM:  1 GiB

Error binding driver 'sunxi-musb': -96
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -96 Some drivers failed to bind
initcall sequence 7efbdfc8 failed at call 4a00d07b (err=-96) ### ERROR ### Please RESET the board ###
[/snip]

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Could it be caused by a side effect of the upcoming CONFIG_DM_USB changes?

No, board file change wrt this commit 0131162439508801b9f8a330fa731f04273c9337

Need to figure out.

Yup, bisecting points to the same commit and reverting fixes the issue.

Can you try with  DM_USB_GADGET enabled?

Yes, the result is:

Quoted 7 lines
Quoted 3 lines

drivers/usb/gadget/udc/udc-uclass.c:52: undefined reference to `dm_usb_gadget_handle_interrupts

u-boot configuration file is A20-OLinuXino-Lime2-eMMC_defconfig

Thanks for testing.

Can you try with the following modifications?

Works!

Quoted 92 lines

It should provide the missing  UCLASS_DRIVER() without having to enable DM_USB_GADGET.

If that fixes your problem, I'll run it through buildman and submit a proper the patch.

drivers/usb/gadget/udc/Makefile +0 -0
index 38ac2dd..73cf84f 100644
@@ -6,4 +6,6 @@ ifndef CONFIG_$(SPL_)DM_USB_GADGET

 obj-$(CONFIG_USB_DWC3_GADGET)  += udc-core.o
 endif

drivers/usb/gadget/udc/Makefile +3 -1
-obj-$(CONFIG_$(SPL_)DM_USB_GADGET)     += udc-uclass.o udc-core.o
+obj-$(CONFIG_$(SPL_)DM_USB_GADGET)     += udc-core.o
+obj-$(CONFIG_$(SPL_)DM) += udc-uclass.o
+
drivers/usb/gadget/udc/udc-uclass.c +2 -0
index e9f8f5f..8d78647 100644
@@ -9,6 +9,7 @@
  #include <dm/device-internal.h>
  #include <linux/usb/gadget.h>
 
+#if CONFIG_IS_ENABLED(DM_USB_GADGET)
  #define MAX_UDC_DEVICES 4
  static struct udevice *dev_array[MAX_UDC_DEVICES];
  int usb_gadget_initialize(int index)
@@ -51,6 +52,7 @@ int usb_gadget_handle_interrupts(int index)
                 return -EINVAL;
         return dm_usb_gadget_handle_interrupts(dev_array[index]);
  }
+#endif
 
  UCLASS_DRIVER(usb_gadget_generic) = {
         .id             = UCLASS_USB_GADGET_GENERIC,
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines

0131162439508801b9f8a330fa731f04273c9337 is the first bad commit commit 0131162439508801b9f8a330fa731f04273c9337

Author: Jean-Jacques Hiblot <[email protected]>
Date:   Thu Nov 29 10:52:46 2018 +0100

dm: usb: create a new UCLASS ID for USB gadget devices UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.
Also move the generic DM code for USB gadgets in a separate file for clarity.

:040000 040000 5223a6058a0c4a1e877f32355c947d4a607fef1b d3f89658db63ec26d887163740cf5d974dd2c0e5 M board
:040000 040000 67c4404917ada478595b408d7747a6f5c17c0c99 8c67ea39df65e4e982d9b9eeb984d66678a33fc8 M drivers
:040000 040000 89243fd62729e128489d80e206db4fa9b946dc99 16783bd1f210ae3454255cb1c4eaa05fe7eaa6ed M include

$ git bisect log
git bisect start
# bad: [058701534ffde8032649ba8421a0428959519b79] WIP
git bisect bad 058701534ffde8032649ba8421a0428959519b79
# bad: [d94604d558cda9f89722c967d6f8d6269a2db21c] Merge tag 'fsl-qoriq-for-v2019.01-rc2' of git://git.denx.de/u-boot-fsl-qoriq
git bisect bad d94604d558cda9f89722c967d6f8d6269a2db21c
# good: [c49aff3e66b930aa06936afee401cf5e19377958] Merge branch 'master' of git://git.denx.de/u-boot-sunxi
git bisect good c49aff3e66b930aa06936afee401cf5e19377958
# bad: [7ff485c68b7e5573e5a4a877066e98398283a24f] Merge branch 'master' of git://git.denx.de/u-boot-i2c
git bisect bad 7ff485c68b7e5573e5a4a877066e98398283a24f
# good: [19f8c4dfb6e744a31da59bdd23b24d144152f1dc] cmd: i2c: Fix help output of i2c command.
git bisect good 19f8c4dfb6e744a31da59bdd23b24d144152f1dc
# bad: [b491afa0f3c0df88027b08f18934cc034c40d659] configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
git bisect bad b491afa0f3c0df88027b08f18934cc034c40d659
# bad: [93991cf1969077108ae36e90acb3cd25a6a449ac] dwc3-generic: Add select_dr_mode operation
git bisect bad 93991cf1969077108ae36e90acb3cd25a6a449ac
# good: [20bebd866690bb09dd1c1cb8ac674c3b17b63c6d] dwc3_generic: do not probe the USB device driver when it's bound
git bisect good 20bebd866690bb09dd1c1cb8ac674c3b17b63c6d
# bad: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
git bisect bad 0131162439508801b9f8a330fa731f04273c9337
# good: [d648a50c0a27452a5439e7982b23b97c64820430] dwc3: move phy operation to core.c
git bisect good d648a50c0a27452a5439e7982b23b97c64820430
# first bad commit: [0131162439508801b9f8a330fa731f04273c9337] dm: usb: create a new UCLASS ID for USB gadget devices
Quoted 4 lines
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/d/optout.