summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2017-07-19 13:51:17 (GMT)
committerMarek Vasut <marex@denx.de>2017-07-28 21:34:35 (GMT)
commit9ca1b4bab10d8b3a5dbbbd98df46ce75159222b8 (patch)
treef3aade735155e1f61308f6844d4ee0e1e7142c47 /drivers/usb
parent5624dfd5aa91c244519ec60b40b4a42b4d9a43ca (diff)
downloadu-boot-fsl-qoriq-9ca1b4bab10d8b3a5dbbbd98df46ce75159222b8.tar.xz
dm: usb: Add a new USB controller operation 'update_hub_device'
For USB host controllers like xHC, its internal representation of hub needs to be updated after the hub descriptor is fetched. This adds a new op that does this. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/usb-uclass.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index d8d74bd..0b8a501 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -139,6 +139,17 @@ int usb_reset_root_port(struct usb_device *udev)
return ops->reset_root_port(bus, udev);
}
+int usb_update_hub_device(struct usb_device *udev)
+{
+ struct udevice *bus = udev->controller_dev;
+ struct dm_usb_ops *ops = usb_get_ops(bus);
+
+ if (!ops->update_hub_device)
+ return -ENOSYS;
+
+ return ops->update_hub_device(bus, udev);
+}
+
int usb_stop(void)
{
struct udevice *bus;