summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/gr_udc.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext()Alexey Khoroshilov2014-05-141-1/+1
| | | | | | | | | | | As far as gr_queue() is called with spinlock held, we have to pass GFP_ATOMIC regardless of gfp argument. Found by Linux Driver Verification project (linuxtesting.org). Acked-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under held spinlockAndreas Larsson2014-04-211-2/+2
| | | | | | | | | As gr_ep_init must be called with dev->lock held, GFP_KERNEL must not be used. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: Return error code when trying to set ep.maxpacket > ↵Andreas Larsson2014-04-211-0/+4
| | | | | | | | | | ep.maxpacket_limit Make gr_ep_enable fail properly when a call requests a larger ep.maxpacket than ep.maxpacket_limit. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: Add ep.maxpacket_limit to debugfs informationAndreas Larsson2014-04-211-0/+1
| | | | | | | | Add information on ep.maxpacket_limit for each endpoint in the debugfs information. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: Use of_property_read_u32_index to access arraysAndreas Larsson2014-04-211-8/+4
| | | | | | | | | Use an appropriate accessor function for property arrays to make the code nicer and make the code correct if it would ever run on little endian architectures. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_mapAndreas Larsson2014-04-211-6/+8
| | | | | | | | | Use platform_get_irq as no mapping needs to be done. No functional difference for SPARC which is the typical environment for the driver though. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: improve platform_device variable nameAndreas Larsson2014-04-211-9/+9
| | | | | | | | | Rename struct platform_device pointers from ofdev to pdev for clarity, while at that, also use platform_set/get_drvdata() helpers. Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: remove some unneeded error handlingDan Carpenter2014-02-201-8/+2
| | | | | | | | | | | | | Debugfs function return an ERR_PTR if they compiled out. We don't need to test for that here because if the debugfs file are compiled out then it is ok to pass an ERR_PTR to debugfs_create_file() since it will just be a no-op stub. Debugfs return NULLs on error, but we don't need to test for that either because debugfs_create_file() will accept NULL pointers. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-081-1/+0
| | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: gadget: remove unused variable in gr_queue_int()Wei Yongjun2014-01-071-3/+0
| | | | | | | | The variable 'dev' is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDCAndreas Larsson2013-12-231-0/+2242
This adds an UDC driver for GRUSBDC USB Device Controller cores available in the GRLIB VHDL IP core library. The driver only supports DMA mode. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud