[PATCH 5/6] USB: host: add xHCI HCD, Hub, and platform driver

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Thu Jul 24 06:46:37 PDT 2014


On 07/24/2014 03:28 PM, Sebastian Hesselbarth wrote:
> This adds support for xHCI USB 3.0 host controllers found on various
> SoCs and PCI devices. Currently, the driver only supports the virtual
> USB 2.0 ports of the host controller, so if you plan to use USB 3.0
> devices, put a USB 2.0 cable in between.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
> ---
[...]
> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> new file mode 100644
> index 000000000000..64d39dd53e5a
> --- /dev/null
> +++ b/drivers/usb/host/xhci-hub.c
> @@ -0,0 +1,699 @@
[...]
> +static void xhci_setup_common_hub_descriptor(struct xhci_hcd *xhci,
> +				     struct usb_hub_descriptor *desc, int ports)
> +{
> +	u16 val;
> +
> +	/* xhci section 5.4.9 says 20ms max */
> +	desc->bPwrOn2PwrGood = 10;
> +	desc->bHubContrCurrent = 0;
> +
> +//	desc->bNbrPorts = ports;
> +	desc->bNbrPorts = xhci->num_usb3_ports + xhci->num_usb2_ports;

Dammit. The commented line is correct, the one below is a left-over
from USB 3.0 testing.

Either fix it up or request a v2 please.

Sebastian




More information about the barebox mailing list