summaryrefslogtreecommitdiff
path: root/drivers/usb/host/usb-uclass.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-11-27 10:25:33 -0500
committerTom Rini <trini@konsulko.com>2022-12-07 16:04:17 -0500
commitb8daa6e9ee079fea7f9772e40b56147274c5726b (patch)
treea09c7deccf5f1d72c65142ed6c919ba894a1b2b3 /drivers/usb/host/usb-uclass.c
parent0a9cbd4f3c90b8ea7230b8dd0885797c48053a5f (diff)
usb: eth: Remove non-DM_ETH code
As DM_ETH is required for all network drivers, it's now safe to remove the non-DM_ETH support code fro usb_ether itself. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/usb/host/usb-uclass.c')
-rw-r--r--drivers/usb/host/usb-uclass.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 060f3441df0..956e2a4e8e4 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -346,49 +346,6 @@ int usb_init(void)
return usb_started ? 0 : -1;
}
-/*
- * TODO(sjg@chromium.org): Remove this legacy function. At present it is needed
- * to support boards which use driver model for USB but not Ethernet, and want
- * to use USB Ethernet.
- *
- * The #if clause is here to ensure that remains the only case.
- */
-#if !defined(CONFIG_DM_ETH) && defined(CONFIG_USB_HOST_ETHER)
-static struct usb_device *find_child_devnum(struct udevice *parent, int devnum)
-{
- struct usb_device *udev;
- struct udevice *dev;
-
- if (!device_active(parent))
- return NULL;
- udev = dev_get_parent_priv(parent);
- if (udev->devnum == devnum)
- return udev;
-
- for (device_find_first_child(parent, &dev);
- dev;
- device_find_next_child(&dev)) {
- udev = find_child_devnum(dev, devnum);
- if (udev)
- return udev;
- }
-
- return NULL;
-}
-
-struct usb_device *usb_get_dev_index(struct udevice *bus, int index)
-{
- struct udevice *dev;
- int devnum = index + 1; /* Addresses are allocated from 1 on USB */
-
- device_find_first_child(bus, &dev);
- if (!dev)
- return NULL;
-
- return find_child_devnum(dev, devnum);
-}
-#endif
-
int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp)
{
struct usb_plat *plat;