summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
Commit message (Collapse)AuthorAgeFilesLines
* complete: add empty complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+2
| | | | | | | | | | for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo, reset, true, usb, version for mach-imx and mach-mxs: dump_clocks for u_serial: mycdev Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'next'Sascha Hauer2012-04-051-0/+1
|\
| * Select POLLER option for fsl_udcAlexander Shiyan2012-04-021-0/+1
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | USB gadget pxa: Fix compiler warningSascha Hauer2012-04-051-1/+1
| | | | | | | | | | | | | | | | Fixes: drivers/usb/gadget/pxa27x_udc.c:1263:13: warning: 'pxa27x_change_interface' defined but not used [-Wunused-function] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | pxa27x_udc: Fix compilation warning.Marek Belisko2012-03-231-2/+2
|/ | | | | | | | Fix following: drivers/usb/gadget/pxa27x_udc.c:1482:1: warning: initialization from incompatible pointer type Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove struct command pointer from commandsSascha Hauer2012-02-271-1/+1
| | | | | | This is unused in all commands and thus can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: fix poller NPE in early pollingRobert Jarzmik2012-01-231-9/+10
| | | | | | | | | | | | | The timings of the poller calling have changed, digging out a latent bug in pxa27x udc controller. The polling routine is called before the probe function is called, and the driver internal are not initialized at that time. This triggers a NULL pointer exception. Fix it by moving poller registration after driver probe. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* u_serial: add setbrg to be able to use loadb & coEric Bénard2012-01-051-0/+5
| | | | | Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* serial gadget: enable/disable on requestEric Bénard2012-01-044-19/+60
| | | | | | | | | | | | | | - add a usbserial command to enable/disable the serial gadget - allow dfu and usbserial to cohexist in the same barebox - add a timeout in u_serial so that we don't get locked if the user enable usbserial from a UART console but doesn't consume the data on the usbserial port created on the PC - remove debug or verbose printf - tested on i.MX25 & i.MX35 & usb-a926x Signed-off-by: Eric Bénard <eric@eukrea.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dfu: fill bwPollTimeout and better handle detachEric Bénard2012-01-041-1/+8
| | | | | | | | | | | | | | | | | - bwPollTimeout is set to 10 ms, from the DFU spec, this is the minimum time, in milliseconds, that the host should wait before sending a subsequent DFU_GETSTATUS request. Without this, I get 25 seconds value and dfu-util waits twice 25s during download - when in IDLE and receiving DETACH, first return 0 to make dfu-util happy, then use a dfudetach variable to exit dfu (without an USB reset as per the comment on line 425) and return to runtime mode. - tested on i.MX25 & i.MX35 & usb-a926x Signed-off-by: Eric Bénard <eric@eukrea.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fsl_udc: update and fixEric Bénard2012-01-041-9/+36
| | | | | | | | | | | - this patch sync fsl_udc.c with linux's driver, - add a poller on usb_gadget_poll to get serial gadget working, - return -EIO in usb_gadget_poll when udc is stopped (do detect cable disonnection) - tested on i.MX25 & i.MX35 Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91_udc: update vbus param only if updatedJean-Christophe PLAGNIOL-VILLARD2012-01-022-2/+16
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: add special treatment for PXA cpusRobert Jarzmik2011-12-211-1/+8
| | | | | | | As PXA cpus suffer from a silicon bug which prevents them from being compound devices, forbid use_acm=1 for PXAs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: add udc usb device controller supportJean-Christophe PLAGNIOL-VILLARD2011-12-144-0/+1700
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: make serial gadget resistant to cable unplugRobert Jarzmik2011-12-051-6/+18
| | | | | | | | | | | | | | As USB can have its cable plugged out anytime, make the serial gadget reliable in case of unplugging : - unregister the gadget_serial provided console - don't stay forever in the read loop if connection was cut This behaviour relies on correct implementation of usb_gadget_poll(), which should return an error if the USB cable was removed. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: add USB serial connect and disconnectRobert Jarzmik2011-12-051-1/+4
| | | | | | | | | | | | | The serial gadget can only work if the serial function is properly connected on USB trigger (ie. on SET_CONFIGURATION or SET_INTERFACE USB message triggering set_alt() in composite.c). Make this connection and handle also the disconnection in f_serial. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: use generic usb_gadget_poll() in u_serialRobert Jarzmik2011-12-051-3/+2
| | | | | | | | | Use the generic gadget polling function instead of the specific fsl function. This is a fix from a leftover in gadget development. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb/gadget: add pxa27x_udc driverRobert Jarzmik2011-12-054-0/+1925
| | | | | | | | | Adapt mainline kernel pxa27x_udc driver to barebox : - remove function header comments as they are in mainline - test it with serial gadget Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/cp: add verbose mode which displays progress barHubert Feurstein2011-11-221-1/+1
| | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: pass size to dma_free_coherentSascha Hauer2011-08-011-1/+1
| | | | | | We'll need it later once we remap dma memory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fsl_udc: switch to resourceJean-Christophe PLAGNIOL-VILLARD2011-07-301-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Fix error handling with malloc, memalign etc. Introduce xmemalign().Krzysztof Halasa2011-01-073-11/+2
| | | | | | | | | | | | | | The idea is to panic() when there is no memory available for normal operation. Exception: code which can consume arbitrary amount of RAM (example: files allocated in ramfs) must report error instead of panic(). This patch also fixes code which didn't check for NULL from malloc() etc. Usage: malloc(), memalign() return NULL when out of RAM. xmalloc(), xmemalign() always return non-NULL or panic(). Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fsl_udc: fix warningEric Bénard2010-10-211-1/+2
| | | | | | | | | | | | this patch fix the following warning : drivers/usb/gadget/fsl_udc.c: In function 'done': drivers/usb/gadget/fsl_udc.c:566: warning: passing argument 1 of 'dma_inv_range' makes integer from pointer without a cast arch/arm/include/asm/mmu.h:24: note: expected 'long unsigned int' but argument is of type 'void *' drivers/usb/gadget/fsl_udc.c:566: warning: passing argument 2 of 'dma_inv_range' makes integer from pointer without a cast arch/arm/include/asm/mmu.h:24: note: expected 'long unsigned int' but argument is of type 'void *' Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* epautoconf: fix compile errorEric Bénard2010-10-141-0/+1
| | | | | | | | | | | | | | this patch fix the following error : CC drivers/usb/gadget/epautoconf.o drivers/usb/gadget/epautoconf.c:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned' drivers/usb/gadget/epautoconf.c: In function 'ep_matches': drivers/usb/gadget/epautoconf.c:168: error: 'epnum' undeclared (first use in this function) drivers/usb/gadget/epautoconf.c:168: error: (Each undeclared identifier is reported only once drivers/usb/gadget/epautoconf.c:168: error: for each function it appears in.) drivers/usb/gadget/epautoconf.c: In function 'usb_ep_autoconfig_reset': drivers/usb/gadget/epautoconf.c:304: error: 'epnum' undeclared (first use in this function) Signed-off-by: Eric Bénard <eric@eukrea.com>
* fsl_udc: make it work with MMU onSascha Hauer2010-05-031-5/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pass arguments to dma_* as unsigned long as the kernel doesSascha Hauer2010-03-301-1/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove typedef cmd_tbl_t and replace it with struct commandSascha Hauer2010-02-011-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove maxargsSascha Hauer2009-10-191-1/+0
| | | | | | | No need to check for maximum argument counts. The commands are safe to be called with more arguments, so lets safe some bytes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add USB device supportSascha Hauer2009-09-2514-0/+6474
This patch adds support for USB devices. It uses the Linux Kernel gadget API. Along with this patch comes driver support for the Freescale (arc) USB OTG Core and USB Device Firmware Update (DFU) The serial gadget support is not working at the moment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>