arm: mach-omap2: am33xx: musb: Fix condition for USB device definition
Subsystems (3)
PATCH 1/1 arm: mach-omap2: am33xx: musb: Fix condition for USB device definition
This patch fixes a bad condition for USB device definition. This prevents from getting a "No USB device found" error.
---
This patch fixes a bad condition which leads to
'no USB device found' error, in usb_ether_init()
function for instance.
--- arch/arm/mach-omap2/am33xx/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/am33xx/board.c +1 -1
@@ -208,7 +208,7 @@ int cpu_mmc_init(struct bd_info *bis)/* AM33XX has two MUSB controllers which can be host or gadget */ #if (defined(CONFIG_AM335X_USB0 ) || defined(CONFIG_AM335X_USB1 )) && \ - defined(CONFIG_SPL_BUILD ) + !defined(CONFIG_SPL_BUILD )static struct musb_hdrc_config musb_config = { .multipoint = 1,
---
base-commit: 19b77d3d23966a0d6dbb3c86187765f11100fb6f
change-id: 20230621-fix_usb_ether_init-4bf4f1135113
Best regards,
Signature · 1 line
Julien Panis <[email protected]>
Quoted 18 lines · Julien Panis
This patch fixes a bad condition for USB device definition. This prevents from getting a "No USB device found" error.
Fixes 6815a66ad7430 ("am33xx: musb: Remove unused configuration logic")Signed-off-by Julien Panis <[email protected]>---
This patch fixes a bad condition which leads to
'no USB device found' error, inusb_ether_init()
function for instance.--- arch/arm/mach-omap2/am33xx/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-omap2/am33xx/board.c +0
-0
arch/arm/mach-omap2/am33xx/board.c int cpu_mmc_init(struct bd_info *bis) · line 214
Quoted 8 lines
arch/arm/mach-omap2/am33xx/board.c +1
-1@@ -208,7 +208,7 @@ int cpu_mmc_init(struct bd_info *bis)/* AM33XX has two MUSB controllers which can be host or gadget */ #if (defined(CONFIG_AM335X_USB0 ) || defined(CONFIG_AM335X_USB1 )) && \ - defined(CONFIG_SPL_BUILD ) + !defined(CONFIG_SPL_BUILD )static struct musb_hdrc_config musb_config = { .multipoint = 1,
Well, that's just going to break USB networking in SPL, which is supposed to be the only case for this code. It's been a while since I poked at this particular part of the code and board, is the gadget port one with a "normal" mini port, or do we need one of the USB A <-> USB A cables for it? My general recollection of when I did 6815a66ad7430 was that the device tree should control the ports in U-Boot itself.
Signature · 1 line
Tom
Quoted 25 lines · Tom Rini
Quoted 24 lines · Julien Panis
This patch fixes a bad condition for USB device definition. This prevents from getting a "No USB device found" error.
Fixes 6815a66ad7430 ("am33xx: musb: Remove unused configuration logic")Signed-off-by Julien Panis <[email protected]>---
This patch fixes a bad condition which leads to
'no USB device found' error, inusb_ether_init()
function for instance.--- arch/arm/mach-omap2/am33xx/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-omap2/am33xx/board.c +1
-1@@ -208,7 +208,7 @@ int cpu_mmc_init(struct bd_info *bis)/* AM33XX has two MUSB controllers which can be host or gadget */ #if (defined(CONFIG_AM335X_USB0 ) || defined(CONFIG_AM335X_USB1 )) && \ - defined(CONFIG_SPL_BUILD ) + !defined(CONFIG_SPL_BUILD )
Quoted 9 lines
arch/arm/mach-omap2/am33xx/board.c int cpu_mmc_init(struct bd_info *bis) · line 214
Quoted 2 lines
arch/arm/mach-omap2/am33xx/board.c +0
-0static struct musb_hdrc_config musb_config = { .multipoint =1 ,Well, that's just going to break USB networking in SPL, which is supposed to be the only case for this code. It's been a while since I poked at this particular part of the code and board, is the gadget port one with a "normal" mini port, or do we need one of the USB A <-> USB A cables for it? My general recollection of when I did
6815a66ad7430was that the device tree should control the ports in U-Boot itself.
That's a "normal" mini port, I am working on am335x-icev2. I missed the logic of 6815a66ad7430. I understand now, so my patch was not suitable to fix the bug I encountered. Additional investigations revealed that usb0 'dr_mode' property is not overlayed to 'peripheral' in 'am335x-icev2-u-boot.dtsi'. That's why I saw this USB error. I'm going to fix that and send a new patch.