summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
* USB: sync Queue Element Transfer Descriptor against EHCI specWolfgang Denk2010-10-202-5/+10
| | | | | | | | | | | | | | | | | | | Appendix B "EHCI 64-Bit Data Structures" of the "Enhanced Host Controller Interface Specification for Universal Serial Bus" (Rev. 1.0, March 12, 2002) defines additional fields which were missing in U-Boot's struct qTD; as these are also present in recent versions of struct ehci_qtd in the Linux kernel, we add them here, too. This fixes some nasty memory corruption problems. Reported-by: Dan Lykowski <lykowdk@gmail.com> See http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/76942 Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Dan Lykowski <lykowdk@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Tested-by: Stefano Babic <sbabic@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk2010-10-191-0/+2
|\ | | | | | | | | | | | | | | Conflicts: board/logicpd/imx31_litekit/config.mk boards.cfg Signed-off-by: Wolfgang Denk <wd@denx.de>
| * MX31: add delay between USB port setup and resetStefano Babic2010-10-181-0/+2
| | | | | | | | | | | | | | | | Sometimes a usb tree is not popolated after a system reset. It seems a delay is required after setting the USB ports for the MX.31 before resetting the ehci controller. Signed-off-by: Stefano Babic <sbabic@denx.de>
* | MPC5121: Add USB EHCI supportDamien Dusha2010-10-184-1/+169
|/ | | | | | | | | | Signed-off-by: Francesco Rendine <francesco.rendine@valueteam.com> Signed-off-by: Damien Dusha <d.dusha@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Coding style cleanup; slight file restructuring. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Remy Bohmer <linux@bohmer.net>
* Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk2010-10-172-0/+131
|\
| * MX31: Add support for MXC EHCI controllerStefano Babic2010-10-132-0/+131
| | | | | | | | | | | | The patch adds the EHCI controller for the i.MX31 Soc. Signed-off-by: Stefano Babic <sbabic@denx.de>
* | usb: musb: only write CLRDATATOG when appropriateBryan Wu2010-10-131-7/+16
| | | | | | | | | | | | | | | | | | | | This is a change similar to what is already in the Linux driver. We should only program the CLRDATATOG bit when the current mode indicates that it is needed. Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | USB-CDC: Prevent rx_req being enqueued twiceVitaly Kuzmichev2010-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After gadget reinitializaton (after tftp has been done once) packet_received may become equal to 1 due to nuking OUT_EP while disabling it in eth_reset_config. rx_submit called from usb_eth_init queues rx_req first time. But the first call of usb_eth_recv from NetLoop queues rx_req again due to packet_received = 1. The following flow shows the path of functions calls when this happens: net/net.c:NetLoop | +-net/eth.c:eth_init | ether.c:usb_eth_init | | | +-udc_driver:usb_gadget_handle_interrupts | | udc_driver:... | | ether.c:eth_setup | | ether.c:eth_set_config | | ether.c:eth_reset_config | | udc_driver:usb_ep_disable | | udc_driver:nuke | | ether.c:rx_complete | | ether.c: packet_received = 1; | | | +-ether.c:rx_submit | udc_driver:usb_ep_queue --- The first time when rx_req is queued | +-net/eth.c:eth_rx ether.c:usb_eth_recv | +-udc_driver:usb_gadget_handle_interrupts | udc_driver:... --- no interrupts, returning +-ether.c: if (packet_received) { ... ether.c:rx_submit udc_driver:usb_ep_queue --- The second time! Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* | USB-CDC: Fix tx/rx_req memory leaksVitaly Kuzmichev2010-10-131-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | Remove and fix needless and destructive operations with tx/rx_req. 1) 'req' in rx_complete is always not NULL and always equals to rx_req 2) Free allocated tx_req if rx_req allocation has failed 3) Do not zero out tx/rx_req in usb_eth_init, leave this for eth_reset_config which will be called at the next use of usb0 4) Additional check in usb_eth_recv is not required Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* | USB: Make non-bulk delay longer in OHCIMarek Vasut2010-10-131-1/+1
|/ | | | | | | This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I experienced on my PXA270 (USB 1.1) Vpac270 board. Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* USB-CDC: Fix coding style issuesVitaly Kuzmichev2010-09-205-330/+357
| | | | | | | | | | | | | | | | | Fixes most of checkpatch warnings and errors in USB gadget stack. The most frequently encountered problems are: 1) "(foo*)", "foo * bar", "foo* bar" 2) C99 // comments 3) No spaces before/after/around '?', ':', '=', '==', ',', '&', '(' 4) Spaces before '[' 5) Spaces between function names and '(' 6) Block braces in wrong places 7) Spaces before tabs 8) Macros with complex values not enclosed in parenthesis 9) Multiline comments start just after /* Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* USB-CDC: called handle_interrupts inside usb_eth_sendStefano Babic2010-09-201-1/+9
| | | | | | | | | The patch removes an endless loop in the usb_eth_send if the tx_complete is not called before going in the loop. The driver interrupt routine is called allowing the driver to check if the TX is completed. Signed-off-by: Stefano Babic <sbabic@denx.de>
* USB-CDC: correct wrong alignment in ether.cStefano Babic2010-09-201-1/+1
| | | | | | | | The buffer for the status request must be word aligned because it is accessed with 32 bit pointer in the eth_status_complete function. Signed-off-by: Stefano Babic <sbabic@denx.de>
* USB-CDC: change simple_strtol to simple_strtoulVitaly Kuzmichev2010-09-201-1/+1
| | | | | | | | | | The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c (done by Julia Lawall <julia@diku.dk>) from linux-2.6.git. Since num is unsigned, it would seem better to use simple_strtoul that simple_strtol. Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* USB-CDC: ethernet error path potential oops fixVitaly Kuzmichev2010-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix potential oops on rare error path. The patch is based on commit e7b13ec9235b9fded90f826ceeb8c34548631351 (done by David Brownell <david-b@pacbell.net>) from linux-2.6.git. Description of the issue taken from linux kernel bugzilla: (https://bugzilla.kernel.org/show_bug.cgi?id=9594) The potential error can be tracked down as follows: (1) line 807: let the second conjunct on the "if" statment be false meaning "dev->status_ep" is null. This means the "if" evaluates to false. follow thru the code until... (2) line 808: usb_ep_disable(dev->status_ep) passes in a null argument, however "usb_ep_disable" cannot handle that: (from include/linux/usb/gadget.h) 191 static inline int 192 usb_ep_disable (struct usb_ep *ep) 193 { 194 return ep->ops->disable (ep); 195 } -- Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* USB-CDC: Correct stat_req initializationVitaly Kuzmichev2010-09-201-4/+3
| | | | | | | | Fix possible oops on stat_req->buf initialization and fix ep0 and status_ep confusion (last one is just intended for stat_req keeping). Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com> Signed-off-by: Stefano Babic <sbabic@denx.de>
* USB-CDC: Replace 'strcpy' by 'strlcpy'Vitaly Kuzmichev2010-09-201-3/+3
| | | | | | Replace 'strcpy' by more safe 'strlcpy' that is implemented in ether.c Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* USB-CDC: Correct freeing usb requestsVitaly Kuzmichev2010-09-201-2/+7
| | | | | | | Fix in_ep and out_ep confusion (rx_req was allocated from out_ep, not from in_ep) and add lost dev->req freeing. Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* USB-CDC: Use native debug printout macrosVitaly Kuzmichev2010-09-201-53/+43
| | | | | | | | Replace Linux-like debug printout macros by native ones. Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com> Applied after removing dead code like '#define DEBUG/#undef DEBUG'
* USB-CDC: Add lost 'qmult' definitionVitaly Kuzmichev2010-09-201-0/+6
| | | | | | | Add lost 'qmult' definition for High Speed devices and make it configurable through CONFIG_USB_ETH_QMULT. Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* USB-CDC: Restuct USB gadget MakefileVitaly Kuzmichev2010-09-201-2/+5
| | | | | | | Prohibit simultaneous usage of both old and new gadget stacks and allow UDC drivers to be dependent on CONFIG_USB_ETHER. Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* Integrate USB gadget layer and USB CDC driver layerRemy Bohmer2010-09-206-0/+2728
| | | | | | | Derived from Linux kernel 2.6.27 Signed-off-by: Thomas Smits <ts.smits@gmail.com> Signed-off-by: Remy Bohmer <linux@bohmer.net>
* usb: musb: stub out MUSB_TXCSR_MODE for Blackfin partsMike Frysinger2010-09-201-0/+2
| | | | | | | The MUSB_TXCSR_MODE register setting isn't supported on Blackfin musb parts, so stub it out to 0. This matches Linux behavior. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* usb: musb: set target address for non-multipoint devicesBryan Wu2010-09-111-0/+7
| | | | | | Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* usb: musb: setup TXCOUNT for Blackfin musbBryan Wu2010-09-111-0/+5
| | | | | | | | | The Blackfin implementation of musb has a TXCOUNT register that needs to be programmed when transmitting data. Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* musb: am35x: Workaround for fifo read issueAjay Kumar Gupta2010-08-122-0/+38
| | | | | | | AM35x supports only 32bit read operations so we need to have workaround for 8bit and 16bit read operations. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
* musb: MSC host support for AM35xAjay Kumar Gupta2010-08-124-0/+215
| | | | | | Tested MSC Host on AM3517EVM. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
* ARMV7: Restructure omap3 musb driver to allow code sharing between OMAP3 and ↵Steve Sakoman2010-08-052-1/+18
| | | | | | | OMAP4 Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* musb: fix compilation warningAjay Kumar Gupta2010-07-151-1/+1
| | | | | | | | | | | Fixes below compilation warning omap3.c: In function 'musb_platform_init': omap3.c:123: warning: implicit declaration of function 'omap3_evm_need_extvbus' Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* drivers/usb/host/ohci-hcd: rename readl/writel to ohci_readl/ohci_writelBecky Bruce2010-06-302-80/+85
| | | | | | | | | This avoids a build warning that you see if anyone in the header chain has included io.h (which is coming shortly). The previous code redefined readl/writel; this patch renames it to be specific to ohci. The defines are also moved from ohci-hcd.c to ohci.h. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
* musb: Program extvbus for OMAP3EVM Rev >= EAjay Kumar Gupta2010-06-302-0/+7
| | | | | | | | OMAP3EVM Rev >=E uses external Vbus supply so setting 'extvbus' to '1' for OMAP3EVM Rev >=E runtime based on EVM revision. CC: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
* musb: Add Phy programming for using external VbusAjay Kumar Gupta2010-06-302-1/+36
| | | | | | | | | | | | | | | | MUSB PHY on OMAP3EVM Rev >= E uses external Vbus supply to support 500mA of power.We need to program MUSB PHY to use external Vbus for this purpose. Adding 'extvbus' member in musb_config structure which should be set by all the boards where MUSB interface is using external Vbus supply. Also added ULPI bus control register read/write abstraction for Blackfin processor as it doesn't have ULPI registers. CC: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* musb: Use name based initialization for musb_configAjay Kumar Gupta2010-06-303-9/+9
| | | | | | | | | | | Changed musb_config initialization for omap3.c, davinci.c and da8xx.c using name of structure fields. This would cause the uninitialized field to be null by default and thus would help in avoiding to init some flags required to be set only for a few selected platforms. CC: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
* USB OHCI support for at91sam9g45 SoCSergey Matyukevich2010-06-301-0/+14
| | | | | | | | | | Add USB OHCI support for at91sam9g45ekes/at91sam9m10g45ek boards. Note that according to errata from Atmel, OHCI is not operational on the first revision of at91sam9g45 chip. So this patch enables OHCI support for later revisions. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
* EHCI: zero out QH transfer overlay in ehci_submit_async()Sergei Shtylyov2010-06-291-2/+1
| | | | | | | | | | | | | | | | | | | | | ehci_submit_async() doesn't really zero out the QH transfer overlay (as the EHCI specification suggests) which leads to the controller seeing the "token" field as the previous call has left it, i.e.: - if a timeout occured on the previous call (Active bit left as 1), controller incorrectly tries to complete a previous transaction on a newly programmed endpoint; - if a halt occured on the previous call (Halted bit set to 1), controller just ignores the newly programmed TD(s) and the function then keeps returning error ad infinitum. This turned out to be caused by the wrong orger of the arguments to the memset() call in ehci_alloc(), so the allocated TDs weren't cleared either. While at it, stop needlessly initializing the alternate next TD pointer in the QH transfer overlay... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Remy Bohmer <linux@bohmer.net>
* drivers/*/Makefile: fix conditional compile rule.Ender.Dai2010-05-061-1/+0
| | | | | | Fix conditional compile rule for twl4030.c and videomodes.c. Signed-off-by: Ender.Dai <ender.dai@gmail.com>
* mips: Move cpu/mips/* to arch/mips/cpu/*Peter Tyser2010-04-131-1/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* EHCI: add NEC PCI IDSergei Shtylyov2010-04-081-0/+1
| | | | | | | | | Add NEC EHCI controller to the list of the supported devices. Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com> drivers/usb/host/ehci-pci.c | 1 + 1 file changed, 1 insertion(+)
* EHCI: fix port reset reportingSergei Shtylyov2010-04-081-15/+17
| | | | | | | | | Commit b416191a14770c6bcc6fd67be7decf8159b2baee (Fix EHCI port reset.) didn't move the code that checked for successful clearing of the port reset bit from ehci_submit_root(), relying on wait_ms() call instead. The mentioned code also erroneously reported port reset state when the reset was already completed. Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
* EHCI: fix off-by-one error in ehci_submit_root()Sergei Shtylyov2010-04-081-1/+1
| | | | | | | | | | | USB devices on the 2nd port are not detected and I get the following message: The request port(1) is not configured That's with default CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS value of 2. 'req->index' is 1-based, so the comparison in ehci_submit_root() can't be correct. Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
* EHCI: fix root hub device descriptorSergei Shtylyov2010-04-081-2/+2
| | | | | | | | On little endian machines, EHCI root hub's USB revision is reported as 0.2 -- cpu_to_le16() was missed in the initializer for the 'bcdUSB' descriptor field. The same should be done for the 'bcdDevice' field. Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
* at91: use C structs for AT91 OHCI codeMatthias Fuchs2010-04-031-15/+13
| | | | | | | | | | | | This patch is part of migrating the AT91 support towards using C struct for all SOC access. It removes one more CONFIG_AT91_LEGACY warning. at91_pmc.h needs cleanup after migration of the drivers has been done. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
* mod change 755 => 644 for multiple filesThomas Weber2010-03-212-0/+0
| | | | | | | | I executed 'find . -name "*.[chS]" -perm 755 -exec chmod 644 {} \;' Signed-off-by: Thomas Weber <swirl@gmx.li> Add some more: neither Makefile nor config.mk need execute permissions. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Prepare v2010.03-rc1Wolfgang Denk2010-03-122-2/+0
| | | | | | Coding style cleanup, update CHANGELOG. Signed-off-by: Wolfgang Denk <wd@denx.de>
* convert common files to new SoC accessJens Scharsig2010-02-121-0/+5
| | | | | | | | * add's a warning to all files, which need update to new SoC access * convert common files in cpu/../at91 and a lot of drivers to use c stucture SoC access Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
* musb: Add host support for DM365 EVMPrathap Srinivas2010-02-032-2/+20
| | | | | | Add support for musb host on DM365 EVM. Signed-off-by: Prathap Srinivas <msprathap@ti.com>
* usb: musb: fix Blackfin DMA register paddingCliff Cai2010-02-031-1/+1
| | | | | | | | | The conversion from offsets to C structs lost a little padding in the DMA register map. Accessing endpoints other than ep0 with DMA would fail as the addresses wouldn't be adjusted correctly. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* SPEAr : usbd driver support for SPEAr SoCsVipin KUMAR2010-01-232-0/+999
| | | | | | | | | | | | | SPEAr SoCs contain a synopsys usb device controller. USB Device IP can work in 2 modes - DMA mode - Slave mode The driver adds support only for slave mode operation of usb device IP. This driver is used along with standard USBTTY driver to obtain a tty interface over USB on the host Signed-off-by: Vipin <vipin.kumar@st.com>
* PCIe, USB: Replace 'end point' references with 'endpoint'Peter Tyser2010-01-171-1/+1
| | | | | | | | | When referring to PCIe and USB 'endpoint' is the standard naming convention. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Remy Bohmer <linux@bohmer.net>
* usb: musb: add virtual root hub control supportBryan Wu2010-01-122-2/+482
| | | | | | | | | For MUSB devices that do not support multipoint (hubs), we have to emulate a root hub so that we can support core operations like resetting ports. Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud