
7 Apr
2015
7 Apr
'15
8:41 p.m.
On 25 March 2015 at 12:22, Simon Glass sjg@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@chromium.org
Changes in v2: None
common/usb.c | 117 ++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 50 deletions(-)
Applied to u-boot-dm/next.