]> git.baikalelectronics.ru Git - uboot.git/commit
usb: hub: identify the hub-device to usb_hub_reset_devices
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Wed, 22 Nov 2017 16:15:17 +0000 (17:15 +0100)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Sun, 26 Nov 2017 01:22:36 +0000 (02:22 +0100)
commitff0d7651db549fceb0dcaab265efaaf0b4df1ff9
treedc763ce48174685b87c9001fff21ff85149f3ba8
parent555f0413a980596aaea704bff45f0dc81d4b3676
usb: hub: identify the hub-device to usb_hub_reset_devices

When usb_hub_reset_devices is called, it should be passed both an
indicator which hub it should operate on and what port number (local
to that hub) should be reset.

Previously, the usb_hub.c code did not include such context and
always started resets from port number 1, performing multiple
reset-requests for the same devices:

       /*
        * 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);

This adds an additional 'hub' parameter to usb_hub_reset_devices
that provides the context to fully qualify the port-number in.

Existing implementations are changed to accept and ignore the new
parameter.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
board/compulab/cm_t54/cm_t54.c
board/ti/omap5_uevm/evm.c
common/usb_hub.c