Skip to content
Snippets Groups Projects
Commit 3615a996 authored by Dan Murphy's avatar Dan Murphy Committed by Marek Vasut
Browse files

USB: usb-hub: Add a weak function for resetting devices


Add a __weak function that can be overridden to reset devices
attached to an ehci devices after the FEAT_POWER has been submitted

Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
parent 04025b42
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,10 @@
static struct usb_hub_device hub_dev[USB_MAX_HUB];
static int usb_hub_index;
__weak void usb_hub_reset_devices(int port)
{
return;
}
static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size)
{
......@@ -426,6 +430,14 @@ static int usb_hub_configure(struct usb_device *dev)
"" : "no ");
usb_hub_power_on(hub);
/*
* Reset any devices that may be in a bad state when applying
* the power. This is a __weak function. Resetting of the devices
* should occur in the board file of the device.
*/
for (i = 0; i < dev->maxchild; i++)
usb_hub_reset_devices(i + 1);
for (i = 0; i < dev->maxchild; i++) {
ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);
unsigned short portstatus, portchange;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment