From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 14 Apr 2015 05:56:01 +0200 Subject: [U-Boot] [PATCH v3 1/3] dm: usb: Move descriptor setup code into its own function In-Reply-To: <1428981544-22643-1-git-send-email-sjg@chromium.org> References: <1428981544-22643-1-git-send-email-sjg@chromium.org> Message-ID: <201504140556.01437.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, April 14, 2015 at 05:19:02 AM, Simon Glass 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut