108 lines
3.7 KiB
Diff
108 lines
3.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ariel D'Alessandro <[email protected]>
|
|
Date: Fri, 10 Jan 2025 12:02:14 -0300
|
|
Subject: GENIO: board: 350/510/700/1200 EVK: Drop deprecated usb_ether_init()
|
|
|
|
Remove USB Ethernet Gadget initialization on GENIO 350/510/700/1200 EVK
|
|
board files, as this is messing up the USB host side. Instead of calling
|
|
deprecated usb_ether_init(), the `bind` command should be used.
|
|
|
|
Due to backported upstream commit 718f1d414eb ("usb: gadget: ether:
|
|
Handle gadget driver registration in probe and remove"), the USB
|
|
ethernet gadget is initialized early, causing enumaration errors on the
|
|
host side.
|
|
|
|
This has been reported upstream in [0]:
|
|
|
|
```
|
|
Fr-om the host's point of view, a device is ready to be enumerated.
|
|
However, since dm_usb_gadget_handle_interrupts() is only called when
|
|
ethernet function is started, at this stage USB events are not managed,
|
|
host's enumeration attempts will fail and resulting error like:
|
|
usb 1-1: new high-speed USB device number 50 using xhci_hcd
|
|
usb 1-1: device descriptor read/64, error -110
|
|
usb 1-1: device descriptor read/64, error -110
|
|
usb usb1-port1: attempt power cycle
|
|
```
|
|
|
|
However, patch fix wasn't accepted as upstream u-boot handles USB
|
|
ethernet gadget in a different way now, requiring manual binding the
|
|
gadget driver. From [0] thread:
|
|
|
|
```
|
|
[...] usb_ether_init() should not be used anymore.
|
|
|
|
Instead, to enable usb ethernet, we should manually bind the UDC driver
|
|
to the usb_ether gadget.
|
|
```
|
|
|
|
[0] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
|
|
|
|
Signed-off-by: Ariel D'Alessandro <[email protected]>
|
|
---
|
|
board/mediatek/genio-1200-evk/mt8195_evk.c | 3 ---
|
|
board/mediatek/genio-350-evk/mt8365_evk.c | 3 ---
|
|
board/mediatek/genio-510-evk/mt8370_evk.c | 3 ---
|
|
board/mediatek/genio-700-evk/mt8390_evk.c | 3 ---
|
|
4 files changed, 12 deletions(-)
|
|
|
|
diff --git a/board/mediatek/genio-1200-evk/mt8195_evk.c b/board/mediatek/genio-1200-evk/mt8195_evk.c
|
|
index 111111111111..222222222222 100644
|
|
--- a/board/mediatek/genio-1200-evk/mt8195_evk.c
|
|
+++ b/board/mediatek/genio-1200-evk/mt8195_evk.c
|
|
@@ -217,9 +217,6 @@ int board_init(void)
|
|
}
|
|
}
|
|
|
|
- if (CONFIG_IS_ENABLED(USB_ETHER))
|
|
- usb_ether_init();
|
|
-
|
|
printf("Enabling SCP SRAM\n");
|
|
for (unsigned int val = 0xFFFFFFFF; val != 0U;) {
|
|
val = val >> 1;
|
|
diff --git a/board/mediatek/genio-350-evk/mt8365_evk.c b/board/mediatek/genio-350-evk/mt8365_evk.c
|
|
index 111111111111..222222222222 100644
|
|
--- a/board/mediatek/genio-350-evk/mt8365_evk.c
|
|
+++ b/board/mediatek/genio-350-evk/mt8365_evk.c
|
|
@@ -111,9 +111,6 @@ int board_init(void)
|
|
}
|
|
}
|
|
|
|
- if (CONFIG_IS_ENABLED(USB_ETHER))
|
|
- usb_ether_init();
|
|
-
|
|
if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
|
|
IS_ENABLED(CONFIG_EFI_PARTITION))
|
|
mediatek_capsule_update_board_setup();
|
|
diff --git a/board/mediatek/genio-510-evk/mt8370_evk.c b/board/mediatek/genio-510-evk/mt8370_evk.c
|
|
index 111111111111..222222222222 100644
|
|
--- a/board/mediatek/genio-510-evk/mt8370_evk.c
|
|
+++ b/board/mediatek/genio-510-evk/mt8370_evk.c
|
|
@@ -163,9 +163,6 @@ int board_init(void)
|
|
}
|
|
}
|
|
|
|
- if (CONFIG_IS_ENABLED(USB_ETHER))
|
|
- usb_ether_init();
|
|
-
|
|
printf("Enabling SCP SRAM\n");
|
|
for (unsigned int val = 0xFFFFFFFF; val != 0U;) {
|
|
val = val >> 1;
|
|
diff --git a/board/mediatek/genio-700-evk/mt8390_evk.c b/board/mediatek/genio-700-evk/mt8390_evk.c
|
|
index 111111111111..222222222222 100644
|
|
--- a/board/mediatek/genio-700-evk/mt8390_evk.c
|
|
+++ b/board/mediatek/genio-700-evk/mt8390_evk.c
|
|
@@ -167,9 +167,6 @@ int board_init(void)
|
|
}
|
|
}
|
|
|
|
- if (CONFIG_IS_ENABLED(USB_ETHER))
|
|
- usb_ether_init();
|
|
-
|
|
printf("Enabling SCP SRAM\n");
|
|
for (unsigned int val = 0xFFFFFFFF; val != 0U;) {
|
|
val = val >> 1;
|
|
--
|
|
Armbian
|
|
|