summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/mv_u3d_core.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: mv_u3d_core: remove unnecessary OOM messagesJingoo Han2014-05-141-12/+2
| | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.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: add "maxpacket_limit" field to struct usb_epRobert Baldyga2013-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds "maxpacket_limit" to struct usb_ep. This field contains maximum value of maxpacket supported by driver, and is set in driver probe. This value should be used by autoconfig() function, because value of field "maxpacket" is set to value from endpoint descriptor when endpoint becomes enabled. So when autoconfig() function will be called again for this endpoint, "maxpacket" value will contain wMaxPacketSize from descriptior instead of maximum packet size for this endpoint. For this reason this patch adds new field "maxpacket_limit" which contains value of maximum packet size (which defines maximum endpoint capabilities). This value is used in ep_matches() function used by autoconfig(). Value of "maxpacket_limit" should be set in UDC driver probe function, using usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function set choosen value to both "maxpacket_limit" and "maxpacket" fields. This patch modifies UDC drivers by adding support for maxpacket_limit. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: remove deprecated IRQF_DISABLEDMichael Opdenacker2013-10-101-1/+1
| | | | | | | | This patch proposes to remove the use of the IRQF_DISABLED flag It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: fix memory leaksValentin Ilie2013-10-011-0/+2
| | | | | | | When trb_hw is NULL, trb should be free'd before return. Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: fix violation of locking discipline in ↵Alexey Khoroshilov2013-09-171-0/+3
| | | | | | | | | | | | | mv_u3d_ep_disable() mv_u3d_nuke() expects to be calles with ep->u3d->lock held, because mv_u3d_done() does. But mv_u3d_ep_disable() calls it without lock that can lead to unpleasant consequences. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: use dev_get_platdata()Jingoo Han2013-07-301-6/+6
| | | | | | | | Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: fix to pass correct device identity to free_irq()Wei Yongjun2013-07-151-2/+2
| | | | | | | | free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: use platform_{get,set}_drvdata()Jingoo Han2013-05-281-1/+1
| | | | | | | | | Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-281-3/+0
| | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Yu Xu <yuxu@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: remove unused clockFelipe Balbi2013-04-021-1/+1
| | | | | | | | | | | The origianl understanding of clock is wrong. The UDC controller only have one clock input. Passing clock name by pdata is wrong. The clock is defined by device iteself. Cc: Chao Xie <chao.xie@marvell.com> Cc: Yu Xu <yuxu@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d: fix sparse warningsFelipe Balbi2013-03-271-0/+4
| | | | | | | | | | | | | | | | | fix the following sparse warnings: drivers/usb/gadget/mv_u3d_core.c:223:20: warning: context imbalance in 'mv_u3d_done' - unexpected unlock drivers/usb/gadget/mv_u3d_core.c:1562:25: warning: context imbalance in 'mv_u3d_handle_setup_packet' - unexpected unlock Note that the non-trivial sparse warnings are left out of this commit due to lack of HW to test: drivers/usb/gadget/mv_u3d_core.c:906:42: warning: incorrect type in argument 2 (different address spaces) drivers/usb/gadget/mv_u3d_core.c:906:42: expected void [noderef] <asn:2>*<noident> drivers/usb/gadget/mv_u3d_core.c:906:42: got unsigned int *<noident> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d: fix sparse warningsFelipe Balbi2013-03-221-13/+14
| | | | | | | | | | | | | | | | | | | | | | | Fix the following sparse warnings: drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_ep_queue’: drivers/usb/gadget/mv_u3d_core.c:812:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c:822:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c:823:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c:823:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_ep_dequeue’: drivers/usb/gadget/mv_u3d_core.c:905:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_probe’: drivers/usb/gadget/mv_u3d_core.c:1840:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c:1855:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c:1855:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] drivers/usb/gadget/mv_u3d_core.c:1858:53: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/mv_u3d_core.c:1858:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_irq_process_tr_complete’: drivers/usb/gadget/mv_u3d_core.c:163:21: warning: ‘remaining_length’ may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/usb/gadget/mv_u3d_core.c:125:28: note: ‘remaining_length’ was declared here Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d: remove unused headersFelipe Balbi2013-03-221-3/+0
| | | | | | | none of those headers are used by the driver, removing them still compiles fine. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d: make mv_u3d_pm_ops staticJingoo Han2013-03-221-5/+3
| | | | | | | | Make mv_u3d_pm_ops static because mv_u3d_pm_ops is not exported. Also, CONFIG_PM_SLEEP is used to remove unnecessary ifdefs. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: don't assign gadget.dev.release directlyFelipe Balbi2013-03-181-6/+0
| | | | | | | udc-core provides a better way to handle release methods, let's use it. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: don't touch gadget.dev.driverFelipe Balbi2013-03-181-2/+0
| | | | | | | udc-core now handles that for us, which means we can remove it from our driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: remove unnecessary initializationsFelipe Balbi2013-03-181-2/+0
| | | | | | | udc-core now sets dma-related and parent fields for us, we don't need to do it ourselves. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: drop now unnecessary flagFelipe Balbi2013-03-181-1/+0
| | | | | | | | | | We don't need the ->register_my_device flag anymore because all UDC drivers have been properly converted. Let's remove every history of it. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: fix a compile warningFelipe Balbi2013-03-181-1/+1
| | | | | | | | | Fix the following compile warning: mv_u3d_core.c:1766:12: warning: 'mv_u3d_remove' \ defined but not used [-Wunused-function] Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mv_u3d_core: let udc-core manage gadget->devFelipe Balbi2013-03-181-9/+1
| | | | | | | By simply setting a flag, we can drop some boilerplate code. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: remove use of __devexitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: gadget: mv: Add USB 3.0 device driver for Marvell PXA2128 chip.Yu Xu2012-06-221-0/+2098
It supports Marvell USB 3.0 device controller for PXA2128 chip. Signed-off-by: Yu Xu <yuxu@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud