diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-07-19 13:51:17 (GMT) |
---|---|---|
committer | Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> | 2017-08-08 08:42:23 (GMT) |
commit | c4a5c1226b2b84f3a0d5b40cebb15393e8f39589 (patch) | |
tree | 02a00149eecfb0ff934dfd0b227c610f0e7df766 /drivers/usb/host | |
parent | fe06ef4214879ab21db55a00b58ef1e07cbe0fb6 (diff) | |
download | u-boot-c4a5c1226b2b84f3a0d5b40cebb15393e8f39589.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/host')
-rw-r--r-- | drivers/usb/host/usb-uclass.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 9bb8477..1078b8c 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; |