summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
Commit message (Collapse)AuthorAgeFilesLines
* usb: musb-new: CONFIG_MUSB prefix replacement with CONFIG_USB_MUSBPaul Kocialkowski2015-08-051-1/+1
| | | | | | | | | USB-related options are usually prefixed with CONFIG_USB and platform-specific adaptation for the MUSB controller already have a CONFIG_USB_MUSB prefix, so this switches all MUSB-related options to a CONFIG_USB_MUSB prefix, for consistency. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* usb: ci_udc: fix request allocation when endpoints are disabledRob Herring2015-07-241-4/+8
| | | | | | | | | | | | | | | | | | The ci_udc driver request allocation assumes that the endpoint descriptor pointer is set to retrieve the endpoint number, but that is only true when the endpoint is enabled. This results in a NULL ptr dereference which for me happens to return 0 value. This causes the EP0 request struct to be returned for other endpoints. Some gadget drivers like fastboot and USB MS work fine, but ethernet does not. Really, the ci_udc driver is the oddball here doing this EP0 special case handling Stephen added. All the other drivers alloc/free functions are pretty much the same with the only variation being the size of the private struct. This could all be consolidated to a common function. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Marek Vasut <marex@denx.de> Acked-by: Stephen Warren <swarren@nvidia.com>
* ci_udc: fix 64-bit compile warningsStephen Warren2015-07-231-9/+10
| | | | | | | This is the same as f72d8320b605 "usb: ci_udc: fix warnings on 64-bit builds", but more. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* usb: CONFIG_USB_FASTBOOT prefix replacement for consistencyPaul Kocialkowski2015-07-221-4/+4
| | | | | | | | | | FASTBOOT is defined both by CONFIG_USB_FUNCTION_FASTBOOT AND CONFIG_CMD_FASTBOOT, so it doesn't make much sense to have a CONFIG_USB_FASTBOOT prefix for fastboot-specific options, especially given that other config options for fastboot use the CONFIG_FASTBOOT prefix. This replaces the CONFIG_USB_FASTBOOT prefix with CONFIG_FASTBOOT, for consistency. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* implement Fastboot via USB OTG on bcm28155_ap boardsJiandong Zheng2015-07-221-0/+1
| | | | | Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com> Signed-off-by: Steve Rae <srae@broadcom.com>
* usb: gadget: bcm_udc_otg filesJiandong Zheng2015-07-222-0/+73
| | | | | | | Add the required files for the Broadcom UDC OTG interface. Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com> Signed-off-by: Steve Rae <srae@broadcom.com>
* usb: gadget: fastboot: Dequeue the previous IN request for the current requestPaul Kocialkowski2015-07-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent versions of the fastboot tool will query the partition type before doing an operation on a partition (such as erase, flash, etc). It will then submit the operation as soon as the response for the partition type is received. Usually, the MUSB controller will see that the partition type request return status was read by the host at the very same time as the actual operation request is submitted by the host. However, the operation will be read first (int_rx is handled first in musb_interrupt) and after it is completed, the fastboot USB gadget driver will send another return status. Hence, this happens before the musb gadget framework has had a chance to handle the previous acknowledgement that the host read the return status and dequeue the request. The host will then usually empty the FIFO by the time musb_interrupt gets around handling the return status acknowledgement (for the previous request, this is still on the same musb_interrupt call), so no other interrupt is generated and the most recent return status acknowledgement remains unaccounted for. It will then be used as a response for the next command, and the proper response for it will be delayed to the next command, and so on. Dequeuing the previous IN request in the fastboot code ensures that no previous return status remains. It is acceptable to do it since there is no callback to it anyways. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* usb: gadget: fastboot: Request status and length check in rx handlerPaul Kocialkowski2015-07-221-5/+6
| | | | | | | | | This avoids handling requests that have an error status or no data. In particular, this avoids showing unnecessary error messages when the USB gadget gets disconnected (e.g. with fastboot continue) and the fastboot USB gadget driver sends an error back to the host (that has disconnected already). Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget codePaul Kocialkowski2015-07-221-0/+13
| | | | | | | | | | | | Weak versions of board_usb_init and board_usb_cleanup are defined in common USB host code, but it is also used for USB device gadgets, so we also need a weak definition of it when there is no USB host enabled. Both weak definitions do not conflict. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)
* usb: Fastboot function config for better consistency with other functionsPaul Kocialkowski2015-07-221-1/+1
| | | | | | | | | | | | USB download gadget functions such as thor and dfu have a separate config option for the USB gadget part of the code, independent from the command part. This switches the fastboot USB gadget to the same scheme, for better consistency. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)
* usb: USB download gadget and functions config options coherent namingPaul Kocialkowski2015-07-221-4/+4
| | | | | | | | | | | | This introduces a coherent scheme for naming USB download gadget and functions config options. The download USB gadget config option is moved to CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each function's config option is moved to a CONFIG_USB_FUNCTION_ prefix. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)
* usb: f_mass_storage: sleep_thread: decrease the interval for check ctrlc()Inha Song2015-06-081-1/+1
| | | | | | | | | | | | | This change decreases the interval of calls to: - display busy indicator - check ctrlc() - check cable connection By this change, breaking the UMS command is more easy on Odroid XU3. Signed-off-by: Inha Song <ideal.song@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* ci_udc: Update the ci_udc driver to support bulk transfersSiva Durga Prasad Paladugu2015-05-292-19/+117
| | | | | | | | | Update the ci_udc driver to support bulk transfer and also added capability of having multiple dtds if requested data is more than 16K. These changes are tested for both the DFU and lthor. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
* net: cosmetic: Fix var naming net <-> eth driversJoe Hershberger2015-04-181-2/+3
| | | | | | | | | | | | | | | Update the naming convention used in the network stack functions and variables that Ethernet drivers use to interact with it. This cleans up the temporary hacks that were added to this interface along with the DM support. This patch has a few remaining checkpatch.pl failures that would be out of the scope of this patch to fix (drivers that are in gross violation of checkpatch.pl). Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Name ethaddr variables consistentlyJoe Hershberger2015-04-181-4/+4
| | | | | | | | Use "_ethaddr" at the end of variables and drop CamelCase. Make constant values actually 'const'. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: Allow setting up a USB controller as a device/gadgetSimon Glass2015-04-181-0/+4
| | | | | | | | | | | | Some controllers support OTG (on-the-go) where they can operate as either host or device. The gadget layer in U-Boot supports this. While this layer does not interact with driver model, we can provide a function which sets up the controller in the correct way. This way the code at least builds (although it likely will not work). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* fastboot: add support for reboot-bootloader commandAlexey Firago2015-04-141-0/+13
| | | | | | | | | | | | | | | | | | The "fastboot reboot-bootloader" command is defined to re-enter into fastboot mode after rebooting into bootloader. This command is usually used after updating bootloader via fastboot. This commit implements only a generic side of the command - setting of the reset flag and then resetting. Setting of the reset flag is implemented using __weak fb_set_reboot_flag() function. The actual setting and checking of the reset flag should be implemented by a boot script and/or board/SoC specific code. Signed-off-by: Alexey Firago <alexey_firago@mentor.com> Tested-by: Steve Rae <srae@broadcom.com> [Test HW: bcm28155_ap board]
* usb: gadget: thor: Claim EP after allocating it in thor gadgetMarek Szyprowski2015-04-141-0/+3
| | | | | | | Storing thor device struct as an EP private data. It is necessary for DWC3 operation. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
* usb: dwc3: gadget: add common endpoint configuration for dwc3 udc driverMarek Szyprowski2015-04-142-1/+31
| | | | | | | | | This patch adds code to select standard, commonly used usb endpoint configuration (ep1in-bulk, ep2out-bulk, ep3in-int) to dwc3 driver. This ensures compatibility with old userspace and windows drivers, which expects hardcoded endpoint numbers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
* usb: composite: Add .reset callback to usb_gadget_driver structureLukasz Majewski2015-04-141-0/+1
| | | | | | | DWC3 UDC driver requires presence of .reset callback in a composite driver. This setting is similar to the one nowadays present in linux kernel. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: modify usb_gadget_handle_interrupts to take controller indexKishon Vijay Abraham I2015-04-148-14/+14
| | | | | | | | | | | | | | Since we support multiple dwc3 controllers to be existent at the same time, in order to handle the interrupts of a particular dwc3 controller usb_gadget_handle_interrutps should take controller index as an argument. Hence the API of usb_gadget_handle_interrupts is modified to take controller index as an argument and made the corresponding changes to all the usb_gadget_handle_interrupts calls. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: gadget: defer setting maxpacket till ->setup()Kishon Vijay Abraham I2015-04-142-2/+4
| | | | | | | | | | | | Taken from linux kernel with commit commit 765f5b830e547229bb752e7b232ee83e2b3d49d5 Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu Jun 23 14:26:11 2011 +0200 usb: gadget: defer setting maxpacket till ->setup() Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: dwc3: Makefile: Make dwc3 driver compile in u-bootKishon Vijay Abraham I2015-04-141-1/+1
| | | | | | | | Now that the entire dwc3 driver is adapted to compile with uboot build, modify the Makefiles so that the dwc3 driver can be built. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: gadget: udc: make udc-core compile in u-boot buildKishon Vijay Abraham I2015-04-141-309/+26
| | | | | | | | | | Make udc-core compile in u-boot by removing all linux specific stuff and having only the bare minimal udc-core required for usb gadget drivers. Also modified the file header to a format that is generally being used in u-boot. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: gadget: udc: add udc-core from linux kernel to u-bootKishon Vijay Abraham I2015-04-142-0/+641
| | | | | | | | | | | | | | Added udc-core.c from linux kernel 3.19-rc1 (97bf6af1f9) to u-boot. This will be adapted to work with u-boot in the following patches. Adding support for udc will help to seamlessly port dwc3 driver from linux kernel to u-boot (since dwc3 uses udc-core) and it'll also help to add support for multiple gadget controllers to be functional at the same time. All other gadget drivers can also be adapted to use udc-core. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: mass-storage: Build warning fixes for 64-bitThierry Reding2015-04-141-1/+1
| | | | | | | | | | | Fix a printf format mismatch warning seen on 64-bit builds. Cc: Łukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: ci_udc: fix warnings on 64-bit buildsRob Herring2015-04-141-21/+21
| | | | | | | | | | Change addresses to unsigned long to be compatible with 64-bit builds. Regardless of fixing warnings, the device is still only 32-bit capable. Signed-off-by: Rob Herring <robh@kernel.org> Cc: "Łukasz Majewski" <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* net: Add ethernet FCS length macro in net.hBin Meng2015-03-242-2/+0
| | | | | | | | | Some ethernet drivers use their own version of ethernet FCS length macro which is really common. We define ETH_FCS_LEN in net.h and replace those custom versions in various places. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* usb: gadget: fastboot: Set the Serial Number for Fastboot GadgetDileep Katta2015-02-251-0/+5
| | | | | | | | | | | | Configure the serial number using the serial# environment variable during the fastboot bind. This enables "fastboot devices" to return the serial number for the attached devices. Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Acked-by: Steve Rae <srae@broadcom.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* fastboot: OUT transaction length must be aligned to wMaxPacketSizeDileep Katta2015-02-251-5/+22
| | | | | | | | | | | | | | | OUT transactions must be aligned to wMaxPacketSize for each transfer, or else transfer will not complete successfully. This patch modifies rx_bytes_expected to return a transfer length that is aligned to wMaxPacketSize. Note that the value of wMaxPacketSize and ep->maxpacket may not be the same value, and it is the value of wMaxPacketSize that should be used for alignment. wMaxPacketSize is passed depending on the speed of connection. Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: gadget: fastboot: Add fastboot eraseDileep Katta2015-02-251-0/+25
| | | | | | | | | | | | Adds the fastboot erase functionality, to erase a partition specified by name. The erase is performed based on erase group size, to avoid erasing other partitions. The start address and the size is aligned to the erase group size for this. Currently only supports erasing from eMMC. Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* fastboot: add support for "oem format" commandRob Herring2015-02-251-0/+11
| | | | | | | | | | | Add "oem format" command to write partition table. This relies on the env variable partitions to contain the list of partitions as required by the gpt command. Note that this does not erase any data other than the partition table. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Steve Rae <srae@broadcom.com>
* fastboot: add "fastboot oem" command supportMichael Scott2015-02-251-0/+15
| | | | | | | | | Add code stub to handle "fastboot oem __" command. As unlock is a common fastboot command, distinguish that it is not implemented. Signed-off-by: Michael Scott <michael.scott@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Steve Rae <srae@broadcom.com>
* usb: gadget: pxa25x_udc: fix use-before-initialized bugAlex Sadovsky2015-01-181-2/+2
| | | | | | | | | | | Fix use-before-initialized bug in pxa25x_udc driver. Function usb_gadget_register_driver calls udc_disable, and udc_disable calls pullup_off that uses dev->mach->udc_command. But dev->mach is initialized in usb_gadget_register_driver after calling udc_disable. This patch fixes the order of initialization. Signed-off-by: Alex Sadovsky <Nable.MainInbox@googlemail.com>
* usb: gadget: f_dfu: Add get_alt function to pass the USB compliance testStefan Roese2015-01-181-0/+8
| | | | | | | | | | | | | | | | | | | | Without this function the USB compliance test (USB 2.0 Command Verifier) will fail in the "Interface Descriptor Test" with this error message: FAIL (1.2.51) A successful GetInterface request must return the alternate setting set by a prior call to SetInterface. Lets add this function to read back the value so that the DFU device fully passes the USB compliance test. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Roger Meier <r.meier@siemens.com> Cc: Samuel Egli <samuel.egli@siemens.com> Cc: Enrico Leto <enrico.leto@siemens.com> Acked-by: Heiko Schocher <hs@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* usb: gadget: composite: Fix NULL pointer crash in USB compliance testStefan Roese2015-01-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the DXR2 board (AM335x using MUSB) the USB compliance test suite (USB 2.0 Command Verifier) will cause the board to crash and reset upon the "BOS Descriptor Test - Addressed state". Here the output from the DRX2 while running this test: GADGET DRIVER: usb_dnl_dfu musb-hdrc: peripheral reset irq lost! composite_setup (776) data abort pc : [<87f693ac>] lr : [<87f6911c>] sp : 86f33a58 ip : 00000000 fp : 86f3bbac r10: 00000f00 r9 : 86f33ef4 r8 : 86f37da8 r7 : 00000005 r6 : 86f33a90 r5 : 00000000 r4 : 86f37e30 r3 : 00000000 r2 : 00000000 r1 : 87f9c888 r0 : 00000016 Flags: Nzcv IRQs off FIQs on Mode SVC_32 Resetting CPU ... resetting ... By adding the case statement for USB_DT_BOS and therefore not running into the default case (jump to unkown label) this crash is fixed. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Roger Meier <r.meier@siemens.com> Cc: Samuel Egli <samuel.egli@siemens.com> Cc: Enrico Leto <enrico.leto@siemens.com> Acked-by: Heiko Schocher <hs@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* gadget: f_thor: check pointers before use in download_tail()Przemyslaw Marczak2014-12-181-2/+14
| | | | | | | | | | Some pointers in function download_tail() were not checked before the use. This could possibly cause the data abort. To avoid this, check if the pointers are not null is added. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
* fastboot: add support for continue commandRob Herring2014-12-181-0/+14
| | | | | | | | | | | | The fastboot continue command is defined to exit fastboot and continue autoboot. This commit implements the continue command and the exiting of fastboot only. Subsequent u-boot commands can be processed after exiting fastboot. Autoboot should implement a boot script such as "fastboot; mmc read <...>; bootm" to fully implement the fastboot continue function. Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
* usb, g_dnl: generalize DFU detach functionsRob Herring2014-12-182-1/+18
| | | | | | | | | In order to add detach functions for fastboot, make the DFU detach related functions common so they can be shared. Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
* USB: gadget: atmel_usba_udc: fix transfer hang issueBo Shen2014-12-161-1/+0
| | | | | | | | | | | | | When receive data, the RXRDY in status register set by hardware after a new packet has been stored in the endpoint FIFO. After, we copy from FIFO, we clear it, make the FIFO can be accessed again. In the receive_data() function, this bit RXRDY has been cleared. So, after the receive_data() function return, this bit should not be cleared again, or else it will cause the accessing FIFO corrupt, which will make the data loss. Signed-off-by: Bo Shen <voice.shen@atmel.com>
* lib: string: move strlcpy() to a common placeMasahiro Yamada2014-12-111-24/+0
| | | | | | | | | Move strlcpy() definition from drivers/usb/gadget/ether.c to lib/string.c because it is a very useful function. Let's add the prototype to include/linux/string.h too. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* linux/kernel.h: sync min, max, min3, max3 macros with LinuxMasahiro Yamada2014-11-234-7/+8
| | | | | | | | | | | | | | | | | | | | U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks. Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
* usb: s3c-otg: Allow custom gusbcfgMarek Vasut2014-11-072-7/+13
| | | | | | | | | | | | | | Allow passing in a custom configuration of the gusbcfg register via platform data. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Vince Bridgers <vbridger@altera.com> Acked-by: Pavel Machek <pavel@denx.de> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: s3c-otg: Split out PHY controlMarek Vasut2014-11-073-62/+104
| | | | | | | | | | | | | | | Split the Samsung specific PHY control into a separate file and compile this into the S3C OTG driver only if used on a Samsung system. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Vince Bridgers <vbridger@altera.com> Acked-by: Pavel Machek <pavel@denx.de> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: s3c-otg: Encapsulate PHY controlMarek Vasut2014-11-061-4/+8
| | | | | | | | | | | | | | Encapsulate the Samsung PHY control and its register accesses into the otg_phy_init() and otg_phy_off() functions. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Vince Bridgers <vbridger@altera.com> Cc: Stefan Roese <sr@denx.de> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: s3c-otg: Remove useless includeMarek Vasut2014-11-061-1/+0
| | | | | | | | | | | | | Remove the useless inclusion of arch/arm/gpio.h , which is completely bogus in this driver. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Vince Bridgers <vbridger@altera.com> Cc: Stefan Roese <sr@denx.de> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: gadget: fastboot: terminate commands with NULLEric Nelson2014-10-061-1/+8
| | | | | | | | | | | Without NULL termination, various commands will read past the end of input. In particular, this was noticed with error() calls in cb_getvar and simple_strtoul() in cb_download. Since the download callback happens elsewhere, the 4k buffer should always be sufficient to handle command arguments. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* usb: gadget: fastboot: explicitly set radix of maximum download sizeEric Nelson2014-10-061-1/+1
| | | | | | | | | | | | The processing of the max-download-size variable requires a radix specifier, or the fastboot host tool will interpret it as an octal number. See function get_target_sparse_limit() in file fastboot/fastboot.c in the AOSP: https://android.googlesource.com/platform/system/core/+/master Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* usb: gadget: fastboot: add max-download-size variableEric Nelson2014-10-061-1/+2
| | | | | | | | | | | | Current Android Fastboot seems to use 'max-download-size' instead of 'downloadsize' variable to indicate the maximum size of sparse segments. See function get_target_sparse_limit() in file fastboot/fastboot.c in the AOSP: https://android.googlesource.com/platform/system/core/+/master Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEEDEric Nelson2014-10-061-0/+5
| | | | | | | | | | Force full-speed (12 Mbit/s) operation if CONFIG_USB_GADGET_DUALSPEED is not defined. The controller is capable of high-speed (480 Mbit/s) operation, but some designs may require the use of lower-speed operation. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
OpenPOWER on IntegriCloud