summaryrefslogtreecommitdiff
path: root/drivers/usb/host
AgeCommit message (Collapse)Author
2015-08-05usb: USB storage-specific part ifdef in uclassPaul Kocialkowski
usb_stor_reset is only defined when USB storage support is enabled, thus the function is not declared when such support is missing. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-08-05usb: dwc2: Call board_usb_init() from usb_lowlevel_init()Peter Griffin
This patch makes the dwc2 controller like ehci / ohci / xhci controllers by calling the board_usb_init() function from usb_lowlevel_init. This can then be implemented by specific platforms to initialise their USB hardware (phys / clocks etc). Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
2015-08-02Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2015-08-02arm: mx6: usb: kconfig: add USB_EHCI_MX6 kconfig optionNikita Kiryanov
Add USB_EHCI_MX6 option to menuconfig and use it when migrating cm-fx6 usb config to defconfig. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2015-07-28ARM: Tegra210: Add support to common Tegra source/config filesTom Warren
Derived from Tegra124, modified as appropriate during T210 board bringup. Cleaned up debug statements to conserve string space, too. This also adds misc 64-bit changes from Thierry Reding/Stephen Warren. Signed-off-by: Tom Warren <twarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-07-24Merge git://git.denx.de/u-boot-usbTom Rini
2015-07-22usb: ehci-marvell: Drop wrl accessor functionStefan Roese
This patch removes the wrl accessor function from the Marvell EHCI driver by replacing it with the writel function. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Marek Vasut <marex@denx.de>
2015-07-22drivers: usb: fsl: Remove LS102XA immap inclusionNikhil Badola
Remove LS102XA immap header inclusion from xhci fsl driver. It removes redefinition warnings when built for platforms other than LS102XA Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22drivers: usb: fsl: Implement Erratum A-009116 for XHCI controllerNikhil Badola
This adjusts (micro)frame length to appropriate value thus avoiding USB devices to time out over a longer run Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22drivers: usb: fsl: Remove warnings for 64-bit architecturesNikhil Badola
Replace uint32_t with uintptr_t to remove compilation warnings for 64-bit architectures. Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-07-22usb: fsl: Add XHCI driver supportRamneek Mehresh
Add xhci driver support for all FSL socs Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: xhci: keystone: Remove common dwc3 drv functions callsRamneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: xhci: omap: Remove common dwc3 drv functions callsRamneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: xhci: exynos: Remove common dwc3 drv functions callsRamneek Mehresh
Remove all redundant dwc3 driver function calls that are defined by dwc3 driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-22usb: dwc3: Add DWC3 controller driver supportRamneek Mehresh
Add support for DWC3 XHCI controller driver Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2015-07-21dm: usb: Add driver-model support to ehci-pciSimon Glass
Support driver model in this driver. This uses the normal USB driver search mechanism. Any EHCI controllers will be set up as they are found during usb_init(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
2015-07-21usb: Update some EHCI driver licenses to use SPDXSimon Glass
A few drivers still write out the license in full. Fix these. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
2015-07-21usb: ehci: Correct a missing hypen in an error messageSimon Glass
Add a hyphen to correct the grammar. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: Do not assume that first child is always a hubHans de Goede
On some single port (otg) controllers there is no emulated root hub, so the first child (if any) may be one of: UCLASS_MASS_STORAGE, UCLASS_USB_DEV_GENERIC or UCLASS_USB_HUB. All three of these (and in the future others) are suitable for our purposes, remove the check for the device being a hub, and add a check to deal with the fact that there may be no child-dev. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: Allow usb host drivers to implement usb_reset_root_portHans de Goede
Allow usb uclass host drivers to implement usb_reset_root_port, this is used by single port usb hosts which do not emulate a hub, such as otg controllers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: Rename usb_find_child to usb_find_emul_childHans de Goede
Now that we unbind usb devices from usb_stop() usb_find_child() is only necessary to deal with emulated usb devices. Rename it to make this clear and add a #ifdef to make it a nop in other cases. Note the #ifdef turns usb_find_emul_child() into a nop, rather then not building it and adding another #ifdef to the caller, this is done this way because adding a #ifdef to the caller is somewhat hairy. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-21dm: usb: Use device_unbind_children to clean up usb devs on stopHans de Goede
On an usb stop instead of leaving orphan usb devices behind simply remove them. The result of this commit is best seen in the output of "dm tree" after plugging out an usb hub with 2 devices plugges in and plugging in a keyb. instead, before this commit the output would be: usb [ + ] `-- sunxi-musb usb_hub [ ] |-- usb_hub usb_mass_st [ ] | |-- usb_mass_storage usb_dev_gen [ ] | `-- generic_bus_0_dev_3 usb_dev_gen [ + ] `-- generic_bus_0_dev_1 Notice the non active usb_hub child and its 2 non active children. The first child being non-active as in this example also causes usb_get_dev_index to return NULL when probing the first child, which results in the usb kbd code not binding to the keyboard. With this commit in place the output after swapping and "usb reset" is: usb [ + ] `-- sunxi-musb usb_dev_gen [ + ] `-- generic_bus_0_dev_1 As expected, and usb_get_dev_index works properly and the keyboard works. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-21usb: Add an usb_device parameter to usb_reset_root_portHans 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: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-21usb: usb_setup_device: Drop unneeded portnr function argumentHans 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: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-21usb: Drop device-model specific copy of usb_legacy_port_resetHans 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: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-10usb: Add EHCI support for Armada 38x (mvebu)Stefan Roese
This patch adds USB EHCI host support for the common mvebu platform. Including the Armada 38x. Tested on DB-88F6280-GP eval board. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Marek Vasut <marex@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
2015-06-19usb: ehci: Properly deal with data toggle for interrupt endpointsHans de Goede
Without this we loose every other interrupt packet. We never noticed this because with keyboards the packets which we were loosing would normally be key release packets. But now that we do keyrepeat in software instead of relying on the hid idle functionality, missing a release will result in key repeat triggering. This commit fixes this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-06-16Merge git://git.denx.de/u-boot-usbTom Rini
2015-06-11dm: usb: tegra: Drop legacy USB codeSimon Glass
Drop the code that doesn't use driver model for USB. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-06-11dm: usb: Implement usb_detect_change() for driver modelSimon Glass
Support this function with driver model also (CONFIG_DM_USB). Signed-off-by: Simon Glass <sjg@chromium.org>
2015-06-08Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2015-06-08usb: ehci-vf: Add weak function for board specific initialisationSanchayan Maity
Add a weak function board_ehci_hcd_init which can be used by the board file for board specific initialisation. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2015-06-07drivers: usb: fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrectNikhil Badola
Return if USB_MAX_CONTROLLER_COUNT hence the index of the controller to be initialised is incorrect Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
2015-05-31Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini
2015-05-30ARM: UniPhier: update the vendor name of UniPhier in KconfigMasahiro Yamada
The business for UniPhier Soc family has been transferred from Panasonic Corporation to Socionext Inc. Update the SoC select menu in Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-30ARM: UniPhier: replace <asm/io.h> with <linux/io.h>Masahiro Yamada
In the Linux coding style, it is recommended to include <linux/io.h> rather than <asm/io.h>. Follow this trend. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-29usb: dwc2: Add support for v3 snpsid valuePeter Griffin
This has been tested to the extent that I can enumerate a asix usb networking adapter and boot a kernel over usb on the 96boards hikey u-boot port I'm currently doing. Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
2015-05-15usb: ohci: Add support for interrupt queuesHans de Goede
Add support for interrupt queues to the ohci hcd code, bringing it inline with the ehci and musb-new(host) code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-15usb: ohci: Add an ohci_alloc_urb() functionHans de Goede
Add an ohci_alloc_urb() function, this is a preparation patch for adding interrupt queue support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-15usb: ohci: Do not reuse ed for interrupt endpoints of different devicesHans de Goede
When submitting interrupt packets to an endpoint we only link in the ed once to avoid some races surrounding unlinking of periodic endpoints, but we share one ohci_device struct / one set of ed-s for all devices, which means that if we have an interrupt endpoint at endpoint 1 with one device, and a non interrupt endpoint 1 with another device we end up with the same ed linked into both the periodic and async lists, which is not good (tm). This commit switches over to using separate ohci_device structs, and thus separate ed-s for devices with interrupt endpoints, fixing this. This fixes e.g. matching a usb storage device and keyboard on the same usb-1 hub not working. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-15sunxi: ohci: Add ohci usb host controller supportHans de Goede
This commit adds support for the OHCI companion controller, which makes usb-1 devices directly plugged into to usb root port work. Note for now this switches usb-keyboard support for sunxi back from int-queue support to the old interrupt polling method. Adding int-queue support to the ohci code and switching back to int-queue support is in the works. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-15sunxi: ehci: Convert to the driver-modelHans de Goede
Convert sunxi-boards which use the sunxi-ehci code to the driver-model. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-15usb: ohci: Add dm supportHans de Goede
Add driver-model support to the ohci code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-15usb: ohci: Skip unnecessary mdelay(1) calls in various placesHans de Goede
For some reason the ohci code is full with: #ifdef DEBUG pkt_print(...) #else mdelay(1); #endif AFAICT there is no reason for the mdelay(1) calls. This commit disables them when building the ohci code for new driver-model using boards. It leaves the mdelay(1) calls in place when building for older boards, so as to avoid causing any regressions there. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-15usb: ohci: Remove unnecessary delays from hc_start and power power-on pathsHans de Goede
The usb spec says that we must wait a minimum amount of time after port power on (exact time is in the hub descriptor), this is something which we must not only do for root ports but also for external hub ports, which is why the common usb_hub code already waits a full second after powering up ports. Having a separate wait for just the root hub in the ohci-hcd code only leads to doing the waiting twice for the root ports, so drop the wait from the ohci-hcd code. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-15usb: ohci: Do not resubmit and leak urbs for interrupt packetsHans de Goede
The u-boot usb code uses polling for all endpoints, including interrupt endpoints, so urbs should never be automatically resubmitted. This also fixes a leak of the urb, as submit_int_msg() did not check if an already re-submitted urb exists before creating a new one. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
2015-05-15dm: usb: Do not scan companion buses if no devices where handed overHans de Goede
USB scanning is slow, and there is no need to scan the companion buses if no usb devices where handed over to the companinon controllers by any of the main controllers. This saves e.g. 2 seconds when booting a A10 OLinuxIno Lime with no USB-1 devices plugged into the root usb ports. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-15dm: usb: Add support for companion controllersHans de Goede
USB companion controllers must be scanned after the main controller has been scanned, so that any devices which the main controller which to hand over to the companion have actually been handed over before we scan the companion. As there are no guarantees that this will magically happen in the right order, split the scanning of the buses in 2 phases, first main controllers, and then companion controllers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-15dm: usb: Move printing of usb scan status to usb_scan_bus()Hans de Goede
Move printing of usb scan status to usb_scan_bus(). This is a preparation patch for adding companion controller support to the usb uclass. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-15dm: usb: Add support for interrupt queues to the dm usb codeHans de Goede
Interrupt endpoints typically are polled for a long time by the usb controller before they return anything, so calls to submit_int_msg() can take a long time to complete this. To avoid this the u-boot code has the an interrupt queue mechanism / API, add support for this to the driver-model usb code and implement it for the dm ehci code. See the added doc comments for more details. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>