summaryrefslogtreecommitdiffstats
path: root/include/usb/usb.h
Commit message (Collapse)AuthorAgeFilesLines
* usb: Add usb phy to usb hostSascha Hauer2016-09-291-0/+1
| | | | | | | | Add a struct usb_phy * member to struct usb_host. Also, call usb_phy_notify_connect() / usb_phy_notify_disconnect() when there are connection changes on the root hub. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: core: return -EAGAIN on usb_* functions reentrancePeter Mamonov2015-10-141-0/+1
| | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: increase USB_CNTL_TIMEOUT to match linuxSteffen Trumtrar2015-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | USB requests should be processed within a timeframe of 5s. The linux kernel also uses this timeout value for the control packets. For the musb the increase in timeout helps successfully probing USB devices (at least on one test hardware), but on the other hand doesn't slow down the system, if there are no devices, i.e. the timeout never hits. That means, that the USB core correctly aborts instead of timing out. Why and how the 100ms was chosen in the first place, can not be deduced from the git history, just that it seems to work fine for most boards. Change USB_CNTL_TIMEOUT to 5000ms and replace all occurences of `USB_CNTL_TIMEOUT * x` with just `USB_CNTL_TIMEOUT`, as the timeout is now large enough without it. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: abolish wait_ms() functionMasahiro Yamada2015-02-021-4/+0
| | | | | | | | This function is only used in drivers/usb/*. It is equivalent to mdelay(). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* USB: add usb phy header fileSascha Hauer2014-09-261-9/+0
| | | | | | | Mostly taken from the Linux Kernel to ease porting phy handling code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* USB: Use descriptors from ch11.hSebastian Hesselbarth2014-07-241-26/+1
| | | | | | | | | Use the descriptors from ch11.h instead of duplicating them in usb.h. usb_hub_descriptor now contains a union .u to differentiate HS hub descriptor from SS hub descriptor. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* USB: host: drop force rescanSascha Hauer2014-07-181-3/+3
| | | | | | | | We can now detect changes in the USB device hierarchy properly, so the 'force' option to the usb command is no longer necessary. We just scan the busses each time the usb command is called. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: usb: add tree view capabilityAntony Pavlov2014-07-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds U-Boot 'usb tree' command functionality to barebox. Here is an example output: 1 ID 0000:0000 | u-boot EHCI Host Controller | +-2 ID 05e3:0606 | USB2.0 Hub | +-3 ID 10c4:ea60 | Silicon Labs CP2102 USB to UART Bridge Contr P-00-00669 | +-4 ID 05e3:0606 | | USB2.0 Hub | | | +-5 ID 05e3:0608 | | | USB2.0 Hub | | | | | +-6 ID 0d8c:000c | | C-Media USB Headphone Set | | | +-7 ID 0d8c:000c | C-Media USB Headphone Set | +-8 ID 0846:1040 NETGEAR NETGEAR FA120 Adapter The tree view is enabled with 'usb -t' Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* USB: Remove conflicting USB_SPEED_* definitionsSascha Hauer2014-07-181-2/+0
| | | | | | | | | We have USB_SPEED_* definitions as macros in usb_defs.h and as an enum in ch9.h. The defines in usb.h correspond to hardware bits in the ehci controller. Get rid of them and keep the hardware independent enums. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* USB: Use descriptors from ch9.hSascha Hauer2014-07-181-62/+1
| | | | | | | Use the descriptors from ch9.h instead of duplicating them in usb.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* USB: introduce usb_interface/usb_configuration structsSascha Hauer2014-07-181-17/+18
| | | | | | | | | | | Currently we have two conflicting definitions of struct usb_config_descriptor and struct usb_interface_descriptor in the tree. This is because the USB code uses additional fields in the structs for internal housekeeping. Add struct usb_interface and struct struct usb_configuration with the housekeeping data and embed the corresponding hardware structs into them. This frees the way to use the definitions from ch9.h in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: remove doxygen documentationSascha Hauer2014-06-261-4/+0
| | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: drop unused USB_UHCI_*_ID macrosAntony Pavlov2014-05-221-4/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: remove unimplemented usb_get_dev_index() declarationAntony Pavlov2014-05-221-1/+0
| | | | | | | We do not have usb_get_dev_index() function, so remove this declaration. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: make usb devices children of the corresponding hostSascha Hauer2013-09-241-0/+1
| | | | | | To be able to find usb devices in the hardware tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: implement a usb_host_detect to scan individual USB hostsSascha Hauer2013-06-211-0/+3
| | | | | | | | Currently we can only (re)scan all USB hosts. Add a function to scan individual hosts. This is useful for implementing the detect callback in the next patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: move scanned status into coreSascha Hauer2013-06-211-1/+1
| | | | | | | A command should not be interested in the internal USB core state, so move the state handling into the core. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: Add devicetree helpersSascha Hauer2013-05-301-0/+21
| | | | | | Add helpers to get the dr_mode and the phy_mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove unimplemented usb_driver_unregister declarationAlexander Shiyan2013-04-181-1/+0
| | | | | | | We do not have usb_driver_unregister function, so remove this declaration. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: fix build for big-endian platformAntony Pavlov2013-03-031-1/+1
| | | | | | | | | | | | | The problem was introduced in commit 51885a7d7321c3e6395c36bc4fe8dde7e78cf562 Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Thu Jun 28 09:56:23 2012 +0200 Change byte order detection mechanism to kernel style Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/dma-cache-align'Sascha Hauer2012-07-021-1/+2
|\
| * USB core: device descriptor using dma_allocSascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | The device descriptor needs to be dma save. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB core: allocate setup_packet using dma_allocSascha Hauer2012-06-301-0/+1
| | | | | | | | | | | | The setup packet needs to be dma save. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Change byte order detection mechanism to kernel styleSascha Hauer2012-06-281-2/+4
|/ | | | | | | | | | | | | | | The Linux Kernel defines only one of __LITTLE_ENDIAN and __BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then be tested with #if __BYTE_ORDER == __xx_ENDIAN. As we tend to use a lot of Kernel code in barebox we switch to use the kernel way of determing the byte order. As this always causes a lot of confusion add a check to include/common.h to make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: set MAXINTERFACES = 16Antony Pavlov2012-05-291-1/+1
| | | | | | | Tegra2 needs MAXINTERFACES > 8, so increase the macro's value. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: switch driver_d name to const char*Jean-Christophe PLAGNIOL-VILLARD2012-01-111-1/+1
| | | | | | this will allow to save 200 bytes on a9g20 and 180 bytes on ti xlaoder Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Extended USB device matching.Rosen Kolev2011-09-231-0/+22
| | | | | Extended the USB device matching, adding checks for interface class, interface subclass, and interface protocol.
* usb: honour timeout fieldsSascha Hauer2011-09-201-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: seperate usb command from usb coreSascha Hauer2011-04-111-0/+2
| | | | | | | | This patch makes the USB command optional and makes usb_rescan a global function. This way we can use USB in noninteractive environments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: add missing byteorder includeSascha Hauer2011-01-071-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix usage of __LITTLE_ENDIAN macro.Krzysztof Halasa2010-12-211-1/+1
| | | | | | | | | | Fix usage of __LITTLE_ENDIAN macro. Both __LITTLE_ENDIAN and __BIG_ENDIAN are always defined by include/linux/byteorder/generic.h, checking for their existence is pointless. Signed-off-by: Krzysztof HaƂasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* documentation updatesJuergen Beisert2009-12-151-0/+4
| | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: remove unused fields from struct usb_deviceSascha Hauer2009-09-091-4/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add usb include files missing from USB mergeSascha Hauer2009-04-081-0/+499
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>