- 04 6月, 2016 1 次提交
-
-
由 Masahiro Yamada 提交于
Move CONFIG_USB_XHCI to defconfig files for all boards, renaming it into CONFIG_USB_XHCI_HCD. As commented in the help of "config USB_XHCI" entry, this has been a TODO for a long time; now CONFIG_USB_XHCI_HCD and CONFIG_USB_XHCI have been unified in favor of the former. Note: Some boards define CONFIG_USB_XHCI in their headers without CONFIG_USB, which does not meet the "depends on" in Kconfig. I added CONFIG_USB=y for those boards when converting. Otherwise, they would fail to build. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 07 5月, 2016 3 次提交
-
-
由 Marek Vasut 提交于
The Kingston DT Ultimate USB 3.0 stick is sensitive to this first Get Descriptor request and if the request is not in a separate microframe, the stick refuses to operate. Add slight delay, which is enough for one microframe to pass on any USB spec revision. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Stefan Roese <sr@denx.de> Cc: Stephen Warren <swarren@nvidia.com>
-
由 Marek Vasut 提交于
Some devices, like the SanDisk Cruzer Pop need some time to process the Set Configuration request, so wait a little until they are ready. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Stefan Roese <sr@denx.de> Cc: Stephen Warren <swarren@nvidia.com>
-
由 Marek Vasut 提交于
The pointer should always be inited to NULL, not zero (0). These are two different things and not necessarily equal. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Stefan Roese <sr@denx.de> Cc: Stephen Warren <swarren@nvidia.com>
-
- 23 3月, 2016 1 次提交
-
-
由 Vagrant Cascadian 提交于
Signed-off-by: NVagrant Cascadian <vagrant@debian.org> Acked-by: NMarek Vasut <marex@denx.de> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com>
-
- 21 3月, 2016 1 次提交
-
-
由 Stefan Roese 提交于
Debugging has shown, that all USB hubs are being reset twice while USB scanning. This introduces additional delays and makes USB scanning even more slow. Testing has shown that this 2nd USB hub reset doesn't seem to be necessary. This patch now removes this 2nd USB hub reset. Resulting in faster USB scan time. Here the current numbers: Without this patch: => time usb start starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 9 USB Device(s) found time: 24.003 seconds With this patch: => time usb start starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 9 USB Device(s) found time: 20.392 seconds So ~3.6 seconds of USB scanning time reduction. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: NHans de Goede <hdegoede@redhat.com> Tested-by: NStephen Warren <swarren@nvidia.com> Cc: Marek Vasut <marex@denx.de>
-
- 16 1月, 2016 1 次提交
-
-
由 Peng Fan 提交于
We support max USB_MAXENDPOINTS, so need to use "epno >= USB_MAXENDPOINTS", but not "epno > USB_MAXENDPOINTS". If use ">", we may exceeds the array of if_desc->ep_desc. Signed-off-by: NPeng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Marek Vasut <marex@denx.de> Cc: Paul Kocialkowski <contact@paulk.fr> Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de> Cc: Vincent Palatin <vpalatin@chromium.org>
-
- 31 12月, 2015 2 次提交
-
-
由 Stefan Brüns 提交于
Start split and complete split tokens need the hub address and the downstream port of the first HS hub (device view). The core of the function was duplicated in both host/ehci_hcd and musb-new/usb-compat.h. Signed-off-by: NStefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: NMarek Vasut <marex@denx.de> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Tested-by: NHans de Goede <hdegoede@redhat.com>
-
由 Stefan Brüns 提交于
The configuration descriptor includes all interface, endpoint and auxiliary descriptors (e.g. report, union) so 512 bytes may not be enough. Signed-off-by: NStefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: NMarek Vasut <marex@denx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 12 9月, 2015 1 次提交
-
-
由 Simon Glass 提交于
Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 22 7月, 2015 4 次提交
-
-
由 Hans de Goede 提交于
Add an usb_device parameter to usb_reset_root_port so that it knows which root-port it is resetting. This is necessary for proper device-model support for usb_reset_root_port. Also remove a duplicate declaration of usb_reset_root_port() from usb.h . Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Hans de Goede 提交于
Pass the usb_device instead of the portnr to usb_legacy_port_reset and rename it to usb_hub_port_reset as there is nothing legacy about it. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Hans de Goede 提交于
Drop the unneeded portnr function argument, the portnr is part of the usb_device struct which is passed via the dev argument. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Hans de Goede 提交于
The device-model usb_legacy_port_reset function calls the device-model usb_port_reset function which is a 1 on 1 copy of the non dm usb_legacy_port_reset and this is the only use of usb_port_reset in all of u-boot. Drop both, and alway use the usb_legacy_port_reset() version in common/usb.c . Also while at it make it static as it is only used in common/usb.c . Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 29 5月, 2015 1 次提交
-
-
由 Hans de Goede 提交于
The compiler did not catch this as it was marked __maybe_unused. Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 15 5月, 2015 2 次提交
-
-
由 Vincent Palatin 提交于
Provide a function to detect USB device insertion/removal in order to avoid having to do USB enumeration in a tight loop when trying to detect peripheral hotplugging. Signed-off-by: NVincent Palatin <vpalatin@chromium.org> Reviewed-by: NStefan Reinauer <reinauer@chromium.org> Tested-by: NStefan Reinauer <reinauer@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Hans de Goede 提交于
Propagate the error returned by submit_control_msg() rather then always returning -EIO when the hcd code indicates an error. Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 06 5月, 2015 1 次提交
-
-
由 Hans de Goede 提交于
This fixes descriptor reading of lowspeed devices through ohci not working. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NMarek Vasut <marex@denx.de>
-
- 19 4月, 2015 7 次提交
-
-
由 Simon Glass 提交于
Add the required #ifdefs and remove unwanted data structures so that the USB uclass will be able to use this file. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures. Signed-off-by: NSimon Glass <sjg@chromium.org> Bug-fixes for descriptor reading and usb_new_device() return value Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMarek Vasut <marex@denx.de> Tested-by: NTom Rini <trini@konsulko.com>
-
由 Simon Glass 提交于
Move the code that sets up the device with a new address into its own function, usb_prepare_device(). Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
Move the port reset code into its own function. Rename usb_hub_reset() to indicate that is is now a legacy function. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
This CONFIG is not used anywhere in U-Boot, so drop it. Signed-off-by: NSimon Glass <sjg@chromium.org> Acked-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
This function returns NULL on error at present. Adjust it so that we can return a real error, as is needed with driver model. Also improve the error handling in its caller, usb_hub_port_connect_change(), and adjust the code order to prepare for driver model. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
- 14 4月, 2015 5 次提交
-
-
由 Kishon Vijay Abraham I 提交于
Invoked board_usb_cleanup for cleaning up initialized USB. It will be invoked if the user enterts ctrl-C. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Reviewed-by: NLukasz Majewski <l.majewski@samsung.com>
-
由 Stephen Warren 提交于
When fetching the first descriptor from a new device, only validate that we received at least 8 bytes, not that we received the entire descriptor. The reasoning is: - The code only uses fields in the first 8 bytes, so that's all we need to have fetched at this stage. - The smallest maxpacket size is 8 bytes. Before we know the actual maxpacket the device uses, the USB controller may only accept a single packet (see the DWC2 note in the comment added in the commit). Consequently we are only guaranteed to receive 1 packet (at least 8 bytes) even in a non-error case. Fixes: 1a7758044b04 ("usb: Early failure when the first descriptor read fails or is invalid") Cc: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: NStephen Warren <swarren@wwwdotorg.org>
-
由 Paul Kocialkowski 提交于
This may happen when using an USB1 device on a controller that only supports USB2 (e.g. EHCI). Reading the first descriptor will fail (read 0 byte), so we can abort the process at this point instead of failing later and wasting time. Signed-off-by: NPaul Kocialkowski <contact@paulk.fr>
-
由 Paul Kocialkowski 提交于
This checks that a new USB device is correctly initialized and frees it if not. In addition, this doesn't report that USB was started when no device was found. Signed-off-by: NPaul Kocialkowski <contact@paulk.fr>
-
由 Paul Kocialkowski 提交于
This makes use of errno return codes for representing error codes in a unified way. Signed-off-by: NPaul Kocialkowski <contact@paulk.fr>
-
- 18 1月, 2015 2 次提交
-
-
由 Hans de Goede 提交于
This commit fixes a number of issues with the reset sequence of musb-new in host mode: 1) Our usb device probe relies on a second device reset being done after the first descriptors read. Factor the musb reset code into a usb_reset_root_port function (and add this as an empty define for other controllers), and call this when a device has no parent. 2) Just like with normal usb controllers there needs to be a delay after reset, for normal usb controllers, this is handled in hub_port_reset, add a delay to usb_reset_root_port. 3) Sync the musb reset sequence with the upstream kernel, clear all bits of power except bits 4-7, and increase the time reset is asserted to 50 ms. With these fixes an usb keyboard I have now always enumerates properly, where as earlier it would only enumerare properly once every 5 tries. Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Hans de Goede 提交于
Before this commit u-boot would print the following on boot with musb and no usb device plugged in: starting USB... USB0: Port not available. USB error: all controllers failed lowlevel init This commit changes this to: starting USB... USB0: Port not available. Which is the correct thing to do since the low-level init went fine. Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 08 12月, 2014 1 次提交
-
-
由 Masahiro Yamada 提交于
Including <linux/compiler.h> is enough for general use. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
- 04 11月, 2014 1 次提交
-
-
由 Hans de Goede 提交于
If the device has a parent, it is instantiated from usb_hub_port_connect_change and the portnr is right there in dev->portnr, so there is no need for this whole dance to look it up. Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 29 8月, 2014 1 次提交
-
-
由 Marek Vasut 提交于
As we support both Host and Device mode operation, an OTG controller can return -ENODEV on a port which it found to be in Device mode during Host mode scan for devices. In case -ENODEV is returned, print that the port is not available and continue instead of screaming a bloody error message. Signed-off-by: NMarek Vasut <marex@denx.de>
-
- 21 10月, 2013 4 次提交
-
-
由 Troy Kisky 提交于
This parameter will later be used to verify OTG ports. Signed-off-by: NTroy Kisky <troy.kisky@boundarydevices.com>
-
由 Troy Kisky 提交于
This will be used by usb_lowlevel_init so it will no longer be used by only board specific functions. Move definition of enum usb_init_type higher in file so that it will be available for usb_low_level_init. Signed-off-by: NTroy Kisky <troy.kisky@boundarydevices.com>
-
由 Mateusz Zalega 提交于
This commit unifies board-specific USB initialization implementations under one symbol (usb_board_init), declaration of which is available in usb.h. New API allows selective initialization of USB controllers whenever needed. Signed-off-by: NMateusz Zalega <m.zalega@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Reviewed-by: NLukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com>
-
由 Vivek Gautam 提交于
This adds stack layer for eXtensible Host Controller Interface which facilitates use of USB 3.0 in host mode. Adapting xHCI host controller driver in linux-kernel by Sarah Sharp to needs in u-boot. Initial porting from Linux kernel version 3.4, with following top commit history of drivers/usb/host/xhci* : cf84055 xHCI: Cleanup isoc transfer ring when TD length mismatch found This adds the basic xHCI host controller driver with bare minimum features: - Control/Bulk transfer support has been added with required infrastructure for necessary xHC data structures. - Stream protocol hasn't been supported yet. - No support for quirky devices has been added. Signed-off-by: NVikas C Sajjan <vikas.sajjan@samsung.com> Signed-off-by: NJulius Werner <jwerner@chromium.org> Signed-off-by: NVivek Gautam <gautam.vivek@samsung.com> Cc: Simon Glass <sjg@chromium.org> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Dan Murphy <dmurphy@ti.com> Cc: Marek Vasut <marex@denx.de>
-
- 27 8月, 2013 1 次提交
-
-
由 Julius Werner 提交于
The existing USB configuration parsing code relies on the descriptors' own length values when reading through the configuration blob. Since the size of those descriptors is always well-defined, we should rather use the known sizes instead of trusting device-provided values to be correct. Also adds some safety to potential out-of-order descriptors. Change-Id: I16f69dfdd6793aa0fe930b5148d4521f3e5c3090 Signed-off-by: NJulius Werner <jwerner@chromium.org>
-