summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'iu-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-11-091-9/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/cpu/arm926ejs/mxs/Makefile board/compulab/cm_t35/Makefile board/corscience/tricorder/Makefile board/ppcag/bg0900/Makefile drivers/bootcount/Makefile include/configs/omap4_common.h include/configs/pdnb3.h Makefile conflicts are due to additions/removals of object files on the ARM branch vs KBuild introduction on the main branch. Resolution consists in adjusting the list of object files in the main branch version. This also applies to two files which are not listed as conflicting but had to be modified: board/compulab/common/Makefile board/udoo/Makefile include/configs/omap4_common.h conflicts are due to the OMAP4 conversion to ti_armv7_common.h on the ARM side, and CONFIG_SYS_HZ removal on the main side. Resolution is to convert as this icludes removal of CONFIG_SYS_HZ. include/configs/pdnb3.h is due to a removal on ARM side. Trivial resolution is to remove the file. Note: 'git show' will also list two files just because they are new: include/configs/am335x_igep0033.h include/configs/omap3_igep00x0.h
| * arm: atmel: get rid of too many ifdefferyBo Shen2013-11-041-10/+4
| | | | | | | | | | | | | | | | | | | | | | Get rid of too many ifdeffery in usb ohci driver Add following two configuration for USB clock selecting - CONFIG_USB_ATMEL_CLK_SEL_PLLB: using PLLB as usb ohci input clock - CONFIG_USB_ATMEL_CLK_SEL_UPLL: using UPLL as usb ohci input clock Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
| * arm: atmel: at91sam9n12ek: add usb host supportBo Shen2013-11-041-2/+9
| | | | | | | | | | | | | | Add usb host support for at91sam9n12ek board. Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* | usb, g_dnl: make iSerialNumber board configurableHeiko Schocher2013-11-081-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | add the possibility to set the iSerialNumber board specific. Default value for iSerialNumber is 0x0. This value can changed board specific through the new function g_dnl_set_serialnumber() which must be called from the board specific function g_dnl_bind_fixup(). Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
* | usb: ohci-hcd: submit_common_msg: report actual_length properlyMateusz Kulikowski2013-11-081-1/+1
| | | | | | | | | | | | | | submit_common_msg should report amount of data passed from/to device. Instead, it always returned size requested by Host. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
* | usb: ums: add ums exit feature by ctrl+c or by detach usb cablePrzemyslaw Marczak2013-11-081-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows exiting from UMS mode to u-boot prompt by detaching usb cable or by pressing ctrl+c. Add new config: CONFIG_USB_CABLE_CHECK. If defined then board file should provide function: usb_cable_connected() (include/usb.h) that return 1 if cable is connected and 0 otherwise. Changes v2: - add a note to the README Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | usb: ums: fix disk capacity miscalculation and code cleanupPrzemyslaw Marczak2013-11-081-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch prevents: - ums disk capacity miscalculation because of integer overflow Changes v2: - Prevents passing zero size disk capacity to ums gadget driver - Change function ums_get_capacity() to ums_disk_init() and do ums disk initialization before gadget init - Remove unnecessary code from mass storage driver Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | usb: ums: code refactoring to improve reusability on other boards.Przemyslaw Marczak2013-11-082-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces some cleanups to ums code. Changes: ums common: - introduce UMS_START_SECTOR and UMS_NUM_SECTORS as defined in usb_mass_storage.h both default values as 0 if board config doesn't define them common cleanup changes: - change name of struct "ums_board_info" to "ums" - "ums_device" fields are moved to struct ums and "dev_num" is removed - change function name: board_ums_init to ums_init - remove "extern" prefixes from usb_mass_storage.h cmd_usb_mass_storage: - change error() to printf() if need to print info message - change return values to command_ret_t type at ums command code - add command usage string Changes v2: ums common: - always returns number of read/write sectors - coding style clean-up ums gadget: - calculate amount of read/write from device returned value. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marek.vasut@gmail.com>
* | drivers: usb: convert makefiles to Kbuild styleMasahiro Yamada2013-10-317-224/+69
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | powerpc/usb:Differentiate USB controller base addressramneek mehresh2013-10-242-4/+15
| | | | | | | | | | | | | | | | Introduce different macros for storing addresses of multiple USB controllers. This is required for successful initialization and usage of multiple USB controllers inside u-boot Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
* | usb: rename board_usb_init_type to usb_init_typeTroy Kisky2013-10-221-2/+2
| | | | | | | | | | | | | | | | | | commit bba679144d25b91bcd7befff5a96728a30875f54 "usb: rename board_usb_init_type to usb_init_type" missed xhci-omap.c So, fix that patch here, and fix a checkpatch warning. WARNING: Avoid unnecessary line continuations Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: udc: add udc.h include fileTroy Kisky2013-10-205-1/+6
| | | | | | | | | | | | | | Move common definitions to udc.h This allows musb_udc.h to be removed as well. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: split mv_udc.h fileTroy Kisky2013-10-202-0/+121
| | | | | | | | | | | | | | | | | | | | Move defines only needed by mv_udc.c to a file in the same directory. This allows usbtty to compile for mv_udc, but it still doesn't link. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: optimize ep_enableTroy Kisky2013-10-201-2/+2
| | | | | | | | | | | | Only get head if not ep0. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: optimize bounceTroy Kisky2013-10-201-21/+16
| | | | | | | | | | | | | | | | | | | | | | Only perform one copy, either in the bounce routine for IN transfers, or the debounce rtn for OUT transfer. On out transfers, only copy the number of bytes received from the bounce buffer Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: fix full speed connectionsTroy Kisky2013-10-201-14/+34
| | | | | | | | | | | | | | Set maximum packet length in queue header to wMaxPacketSize of endpoint. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: ehci-mx6: add support for otg portTroy Kisky2013-10-201-40/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, only host1 was supported using an index of 0. Now, otg has index 0, host1 is 1, host2 is 2, host3 is 3. Since OTG requires usbmode to be set after reset, I added CONFIG_EHCI_HCD_INIT_AFTER_RESET to nitrogen6x.h and mx6qsabreauto.h. I also added a weak function board_ehci_power to handle turning power on/off for otg. Type is type of device connected (USB stick vs Host.) Init is type of device desired. Only power up port if type == init == USB_INIT_HOST. Only return error if type != init. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: don't check CONFIG_USB_MAX_CONTROLLER_COUNTTroy Kisky2013-10-201-4/+0
| | | | | | | | | | | | | | | | i.mx6 has 1 otg controller, and 3 host ports. So, CONFIG_USB_MAX_CONTROLLER_COUNT can be greater than 1 even though only 1 device mode controller is supported. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: ehci-hcd: add enum usb_init_type parameter to ehci_hcd_init.Troy Kisky2013-10-2019-25/+46
| | | | | | | | | | | | | | This paramter will later be used to initialize OTG ports in host or device mode. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: add enum usb_init_type parameter to usb_lowlevel_initTroy Kisky2013-10-2010-10/+10
| | | | | | | | | | | | This parameter will later be used to verify OTG ports. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: am437x: Add support for am437x xhci USB hostDan Murphy2013-10-201-0/+23
| | | | | | | | | | | | | | | | | | Add the support for the am437x xhci usb host. The xHCI host on AM437 is connected to a usb2 phy so need to add support to enable those clocks. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | usb: dra7xx: Add support for dra7xx xhci USB hostDan Murphy2013-10-202-6/+45
| | | | | | | | | | | | | | | | | | | | | | Add the support for the dra7xx xhci usb host. dra7xx does not contain an EHCI controller so the headers can be removed from the board file. The xHCI host on dra7xx is connected to a usb2 phy so need to add support to enable those clocks. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | usb: omap: Move the usb phy code to the usb/phy directoryDan Murphy2013-10-203-169/+200
| | | | | | | | | | | | | | | | | | | | | | Moving the usb/phy code from xhci-omap to the usb/phy directory and moving the associated phy code over to the new file. Newer TI processors adding xHCI support will have different PHY configurations so therefore abstracting this code away will prevent messing around with the xhci-omap file itself. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | usb: omap5: Update the board_usb_init apiDan Murphy2013-10-201-3/+4
| | | | | | | | | | | | | | | | | | | | Recent patches declares board_usb_init function prototype for a new usb architecture. Turning on the OMAP_XHCI defines cause a redefinition compiler failure. So update the board_usb_init to the latest prototype. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | usb: omap: Move the xhci-omap header file to common locationDan Murphy2013-10-201-1/+1
| | | | | | | | | | | | | | Moving the xhci-omap header to a more global location so that other code can reference this code. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | usb:g_dnl: Support for TIZEN's THOR function in generic download codeLukasz Majewski2013-10-201-2/+8
| | | | | | | | | | | | | | Support of "thor" function in generic download code (g_dnl.c). Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | usb:g_dnl:f_thor: USB download function to support TIZEN's THOR protocolLukasz Majewski2013-10-203-0/+1128
| | | | | | | | | | | | | | Implementation of USB download function which supports THOR protocol. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | usb:g_dnl: Add name parameter to g_dnl_bind_fixup functionLukasz Majewski2013-10-201-2/+2
| | | | | | | | | | | | | | | | | | New parameter, namely *name has been added to g_dnl_bind_fixup(). It is necessary (for compatibility reasons) to assign new USB idProduct and idVendor for different usb functions. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | usb:g_dnl: Replace static usb_configuration structure with dynamically ↵Lukasz Majewski2013-10-201-8/+16
| | | | | | | | | | | | | | | | | | | | allocated one When the usb_configuration structure is declared as static, it is very hard to assure, that relevant fields (as e.g. config->interfaces[]) are cleared out before new call to g_dnl related functions. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
* | usb:udc:s3c: Reduce dcache invalidate range for UDC receive bufferLukasz Majewski2013-10-201-1/+2
| | | | | | | | | | | | | | | | | | The s3c udc driver sends data in a max packet size. Therefore the dcache invalidate range shall be equal to max packet, not the entire DMA_BUFFER_SIZE. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | usb:smsx95xx LED activity for USB net driverSuriyan Ramasami2013-10-201-0/+14
| | | | | | | | | | | | | | Add LED activity for SMSX95XX USB Ether driver. Signed-off-by: “Suriyan Ramasami" <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | usb: new board-specific USB init interfaceMateusz Zalega2013-10-204-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Mateusz Zalega <m.zalega@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com>
* | usb: gadget: mv_udc: clear desc upon ep_disableTroy Kisky2013-10-201-0/+3
| | | | | | | | | | | | | | desc is set at ep_enable, so for symmetry, clear it at ep_disable. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: zero transfer descriptor memory on probeTroy Kisky2013-10-201-0/+1
| | | | | | | | | | | | Since we flush the TD, we may as well set it to a known value. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: flush item before headTroy Kisky2013-10-201-3/+2
| | | | | | | | | | | | | | | | Make sure the transfer descriptor is flushed before the queue is updated so that the controller will not see old information. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: set is_dualspeed = 1Troy Kisky2013-10-201-0/+1
| | | | | | | | | | | | This controller support full and high speed. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: mv_udc: fix typo in error messageTroy Kisky2013-10-201-2/+2
| | | | | | | | | | | | Change 'nfo=' to 'info=' Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: ether: return error from rx_submit if no requestTroy Kisky2013-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents a crash if tftpboot is given a bad filename. rx_req will be released by eth_reset_config which is called by eth_disconnect, which is called using the .disconnect member of usb_gadget_driver by mv_pullup in mv_udc which is called using the .pullup member of usb_gadget_ops by usb_gadget_disconnect which is called by usb_eth_halt which is called using the .halt member of eth_device by eth_halt which is called by TftpHandler when TFTP_ERR_FILE_NOT_FOUND or TFTP_ERR_ACCESS_DENIED occurs I trigger this with the following commands setenv ipaddr 10.0.0.2 && setenv netmask 255.255.255.0 && setenv serverip 10.0.0.1 setenv usbnet_devaddr 00:11:22:33:44:55 && setenv usbnet_hostaddr 00:aa:bb:cc:dd:ee setenv ethprime usb_ether && setenv ethact usb_ether && setenv ncip 10.0.0.1 tftpboot 10800000 10.0.0.1:missing_file Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | usb: gadget: ether set wMaxPacketSizeTroy Kisky2013-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set wMaxPacketSize for full speed descriptors fs_source_desc, fs_sink_desc to 64. Full-speed bulk endpoint can have a maximum packet size of 8, 16, 32, or 64 bytes, so choice 64. The hs_source_desc, hs_sink_desc, already have their wMaxPacketSize set to 512. That is the only legal value for high speed bulk endpoints. Strictly speaking, this patch is not needed because usb_ep_autoconfig will call ep_matches which will override wMaxPacketSize for BULK endpoints only with the size associated with the endpoint setup by the udc driver. But if you want to rely on this, you may as well combine the full speed descriptor with the high speed descriptor to minimize confusion. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* | OMAP5: USB: Add OMAP xHCI file and headerDan Murphy2013-10-202-0/+327
| | | | | | | | | | | | | | | | Add the OMAP file for the xHCI Host controller This code will initilialize the proper components within the OMAP5 to enable the xHCI host controller. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* | exynos: usb: Switch USB VBUS GPIOs to be device tree configuredJulius Werner2013-10-202-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Exynos boards, such as the SMDK5250, control USB port power through a GPIO pin. For now this had been hardcoded in the exynos5-dt board file, but not all boards use the same pin, requiring local changes to support different boards. This patch moves the GPIO initialization into the USB host controller drivers which they belong to, and uses the samsung,vbus-gpio parameter in the device tree to configure it. Signed-off-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Cc: Simon Glass <sjg@chromium.org> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | USB: XHCI: Add xHCI host controller support for Exynos5Vivek Gautam2013-10-202-0/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds driver layer for xHCI controller in Samsung's exynos5 soc. This interacts with xHCI host controller stack. Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Cc: Julius Werner <jwerner@chromium.org> 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>
* | USB: xHCI: Add stack support for xHCIVivek Gautam2013-10-205-0/+3947
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Vikas C Sajjan <vikas.sajjan@samsung.com> Signed-off-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Vivek 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>
* | usb: Move 'bmRequestType' USB device request macros from EHCI headerVivek Gautam2013-10-201-16/+0
|/ | | | | | | | | | | | | | Macros defining bmRequestType field of USB device request, given in table 9.2 USB 2.0 spec, are rather generic macros which can be further used by other Host controller stacks. So moving them to usb_defs header. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Cc: Julius Werner <jwerner@chromium.org> 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>
* Coding Style cleanup: drop some excessive empty linesWolfgang Denk2013-10-141-5/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Coding Style cleanup: remove trailing empty linesWolfgang Denk2013-10-141-1/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-143-3/+3
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* usb: Prevent using reserved registers on DM36x usbAndrew Murray2013-10-101-5/+14
| | | | | | | | | | | | | | | | The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this bit is reserved on the DM36x. Thus this patch ensures that the reserved bit is not accesssed. It has been observed that some USB devices will fail to enumerate with errors such as 'error in inquiry' without this patch. See http://www.ti.com/litv/pdf/sprufh9a for details. Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk> Acked-by: Marek Vasut <marex@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-10-081-5/+5
|\
| * usb: Fix error handling in musb_hcd.cAndrew Murray2013-10-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wait_until_[rx|tx]ep_ready functions return a u8 to indicate success containing the value 0, 1 or -1. This patch changes the return type to an int to accommodate the negative return values. These functions are used in the file using calls such as if (!wait_until... Where a -1 is returned it is mishandled and treated as success instead of a CRC error. This patch addresses this. Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk> Acked-by: Marek Vasut <marex@denx.de>
OpenPOWER on IntegriCloud