[U-Boot] [PATCH v2 17/80] dm: usb: Move descriptor setup code into its own function

Simon Glass sjg at chromium.org
Tue Apr 7 20:41:20 CEST 2015


On 25 March 2015 at 12:22, Simon Glass <sjg at chromium.org> wrote:
> usb_new_device() is far too long and does far too much. As a first step, move
> the code that does initial setup and reads a descriptor into its own function
> called usb_setup_descriptor().
>
> For XHCI the init order is different - we set up the device but don't
> actually read the descriptor until after we set an address. Support this
> option as a parameter to usb_setup_descriptor().
>
> Avoid changing this torturous code more than necessary to make it easy to
> review.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2: None
>
>  common/usb.c | 117 ++++++++++++++++++++++++++++++++++-------------------------
>  1 file changed, 67 insertions(+), 50 deletions(-)

Applied to u-boot-dm/next.


More information about the U-Boot mailing list