summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/s3c-hsotg.c
AgeCommit message (Collapse)Author
2012-08-23usb: gadget: s3c-hsotg: fix core reset timeout failureDu, Changbin
The timeout values were 1000 and timeout issue occured many times on my s3c6410 Soc based board (mostly when booting whith USB cable not connected). This patch increase the values to 10000 to guarantee the success of reset. Having set timeout to 10000, I printed the remained timeout values which could cause timeout issue before this change (tested several times). the first timeout value remained: timeout = 8079 timeout = 8079 timeout = 8078 timeout = 8081 the second timeout value remained: timeout = 7940 timeout = 7945 timeout = 7940 timeout = 7938 Seeing from above values, I think the value 10000 is big enough. Signed-off-by: Du, Changbin <changbin.du@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-15drivers/usb/gadget/s3c-hsotg.c: fix error return codeJulia Lawall
Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; } | ret = 0 ) ... when != ret = e1 *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...); ... when != x = e2 when != ret = e3 *if (x == NULL || ...) { ... when != ret = e4 * return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-02usb: gadget: s3c-hsotg: Propagate devicetree to gadget driversAlexandre Pereira da Silva
Fill dev.of_node of gadget drivers, so they can use devicetree Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22usb: gadget: hsotg: pullup method implementation for s3c-hsotg UDC driverLukasz Majewski
This commit adds pullup method implementation for UDC s3c-hsotg driver. It is needed for e.g. CCG - Configurable Composite Gadget, when user space configuration change request device disconnection from USB bus (done via calling usb_gadget_connect/disconnect, which calls UDC's pullup method). Implementation of pullup method has caused removal of phy_enable and core_init methods from udc_start to pullup. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15usb: hsotg: samsung: smp Provide *_lock functions abstraction layer for SMP SoCsLukasz Majewski
For SMP processors the spin_lock_irqsave is _only_ able to disable interrupt on a core on which it is executed. Therefore there may be a situation when other cores raise s3c-hsotg IRQ. Then there are several places where critical sections can be overwritten. To protect the above thread, a spin_lock in the interrupt handler has been added. Due to coherent memory view (especially L1 cache) the spin lock variable control access to IRQ handler only for one CPU core. In this way serialization to access this driver is provided and hence several spin_lock_* routines could be removed from IRQ handler's related functions. The complete_request_lock function has been removed since all its calls are performed from interrupt (spin lock protected) context. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15usb: hsotg: samsung: Protect the udc_stop routine with spinlockLukasz Majewski
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15usb: hsotg: samsung: Replace endpoint specific locks with a global lockLukasz Majewski
The endpoint specific locks are replaced with a global lock. This is crucial for running s3c-hsotg driver on a SMP SoC. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04usb: s3c-hsotg: Use devm_* functions in s3c-hsotg.c fileSachin Kamat
devm_* functions are used to replace kzalloc, request_mem_region, ioremap and request_irq functions in probe call. With the usage of devm_* functions explicit freeing and unmapping is not required. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-09usb:hsotg:samsung:cosmetic Move <linux/platform_data/s3c-hsotg.h> to proper ↵Lukasz Majewski
place This commit adds a cosmetic change to the s3c-hsotg UDC driver. It moves s3c-hsotg.h to other linux/ related inclusions. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-04usb:hsotg:samsung: err_irq: support for probe functionLukasz Majewski
Missing handler for freeing requested IRQ added. Moreover clk_ calls has been reorganized. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Use clk_prepare_enable and clk_disable_unprepareLukasz Majewski
This commit adjust the s3c-hsotg to new clock API. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Remove the S3C_ prefix from registers definition.Lukasz Majewski
This code removes the S3C_ prefix from s3c-hsotg driver. This change provides more architecture independent code. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Add release function for hsotg deviceLukasz Majewski
Add release function to prevent kernel warning. Kfree is performed when all references are gone. Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Remove our_hsotg global pointerLukasz Majewski
The our_hsotg global pointer to hsotg USB device state is removed. It has been replaced with to_hsotg(gadget) function. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Comments reorganization and cleanupLukasz Majewski
Refactor all comments to comply with kernel codding style. Moreover doxygen descriptions have been added for selected functions. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Use new udc_start and udc_stop callbacksLukasz Majewski
Replace of deprecated start and stop callbacks with a udc_start and udc_stop ones. Now the bind from composite driver is NOT called explicitly, so more work needs to be done at s3c_udc_probe. Especially enabling SoC clocks and power for runtime determination of EP number. After probing, those sources are disabled and enabled again at udc_start and pullup afterwards. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Determine number of EPs from HW configuration registerLukasz Majewski
This commit adds support for determining of EPs number during run time. Configuration is read from a HW configuration register in a specially created s3c_hsotg_hw_cfg function. Moreover it was necessary to defer at probe allocation of the struct s3c_hsotg_ep instances until number of endpoints is known. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Cable disconnection recovery codeLukasz Majewski
This code allows Samsung SoC's to recover its state when device is disconnected and connected during transfer. It is necessary, in such a scenario, to reinitialize the USB core to assure correct initial state of the driver. This operation is needed since the disconnect interrupt is only available at HOST mode, which is not supported by this driver. A simple mechanism with jiffies has been used to perform core reset only once. Tested with: - DFU gadget (various size of the sent data - also packet = MPS) - Ethernet gadget (CDC and RNDIS) - Multi Function Gadget (g_multi) HW: - Samsung's C210 Universal rev.0 Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Rename s3c_hsotg_disconnect functionLukasz Majewski
The s3c_hsotg_disconnect_irq function has been renamed to reflect, that it can be used not only during the host disconnect irq. The s3c_hsotg_disconnect shall be used as a fall back for scenario when USB cable is unplugged and plugged to the device. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Remove Disconnect Interrupt handlerLukasz Majewski
The USB Disconnect Interrupt handler, according to specification, is only working at HOST mode. Samsung SoCs (e.g. Exynos4) are working at device mode, so this interrupt is never caught. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Extract core initialization functionLukasz Majewski
The s3c_hsotg_core_init function has been added to exclude code responsible for Samsung's SoCs USB core initialization. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Sending ZLP packet for IN EP0 transfersLukasz Majewski
This commit targets following scenarios for IN requests: 1. HOST requests e.g. 256B (which is a multiple of MPS = 64B). Then NO ZLP shall be sent, since host expects exact number of bytes. 2. HOST requested 4096B, but our data for sending is 256B. In this situation ZLP shall be send to tell HOST that no more data is available and it shall not wait for more data. This prevents HOST from hanging. Tested with: - DFU gadget (various size of the sent data - also packet = MPS) - Ethernet gadget (CDC and RNDIS) - Multi Function Gadget (g_multi) HW: - Samsung's C210 Universal rev.0 - Samsung's C110 GONI Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: NAK management for EP0 (Setup stage of control transfers)Lukasz Majewski
For SETUP stage of USB control transmission, the NAK shall NOT be CLEAR. The SNAK/CNAK control is crucial for this type of driver, since data arrives to earlier defined requests. Tested with: - DFU gadget (various size of the sent data - also packet = MPS) - Ethernet gadget (CDC and RNDIS) - Multi Function Gadget (g_multi) HW: - Samsung's C210 Universal rev.0 Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Use of regulator_bulk_* functions for USB regulatorsLukasz Majewski
This commit adds support for supply voltage management for s3c-hsotg IP block. For that purpose a convenient regulator_bulk_* functions have been used. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Wrappers for USB PHY methodsLukasz Majewski
Wrappers for PHY methods have been added for readability and reduction of code repetition. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Remove platform dependent functions from s3c-hsotgLukasz Majewski
Two functions - namely: s3c_hsotg_gate and s3c_hsotg_otgreset are platform dependent and therefore removed from Samsung's generic s3c-hsotg code. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb:hsotg:samsung: Remove platform dependency from s3c-hsotgLukasz Majewski
This code removes platform dependency from s3c-hsotg driver. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-10usb: s3c-hsotg: Fix big buffers transfer in DMA modeAnton Tikhomirov
DMA address register shouldn't be updated manually if transfer size requires multiple packets. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-10usb: s3c-hsotg: Avoid TxFIFO corruption in DMA modeAnton Tikhomirov
Writing to TxFIFO relates only to Slave mode and leads to TxFIFO corruption in DMA mode. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-10usb: s3c-hsotg: Fix maximum patcket size setting for EP0Anton Tikhomirov
MPS field of DOEPCTL0 is read only. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-10usb: s3c-hsotg: Fix TX FIFOs allocationAnton Tikhomirov
According to documentation, TX FIFO_number index starts from 1. For IN endpoint FIFO 0 we use GNPTXFSIZ register for programming the size and memory start address. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-13Merge branch 'for-next/gadget' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next * 'for-next/gadget' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (50 commits) usb: renesas_usbhs: show error reason on usbhsh_urb_enqueu() usb: renesas_usbhs: add force packet remove method usb: renesas_usbhs: care usb_hcd_giveback_urb() status usb: renesas_usbhs: add usbhsh_is_running() usb: renesas_usbhs: disable attch irq after device attached usb: renesas_usbhs: care pipe sequence usb: renesas_usbhs: add usbhs_pipe_attach() method usb: renesas_usbhs: add usbhsh_endpoint_detach_all() for error case usb: renesas_usbhs: modify device attach method usb: renesas_usbhs: pop packet when urb dequeued usb: renesas_usbhs: add lost error value when enqueue usb: gadget: mv_udc: replace some debug info usb: gadget: mv_udc: refine suspend/resume function usb: gadget: mv_udc: refine the clock relative code usb: gadget: mv_udc: disable ISR when stopped usb: gadget: mv_udc: add otg relative code usb: gadget: Use kcalloc instead of kzalloc to allocate array usb: renesas_usbhs: remove the_controller_link usb: renesas_usbhs: add test-mode support usb: renesas_usbhs: call usbhsg_queue_pop() when pipe disable. ...
2011-12-12Merge branch 'for-next/dwc3' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next * 'for-next/dwc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (392 commits) usb: dwc3: ep0: fix for possible early delayed_status usb: dwc3: gadget: fix stream enable bit usb: dwc3: ep0: fix GetStatus handling (again) usb: dwc3: ep0: use dwc3_request for ep0 requsts instead of usb_request usb: dwc3: use correct hwparam register for power mgm check usb: dwc3: omap: move to module_platform_driver usb: dwc3: workaround: missing disconnect event usb: dwc3: workaround: missing USB3 Reset event usb: dwc3: workaround: U1/U2 -> U0 transiton usb: dwc3: gadget: return early in dwc3_cleanup_done_reqs() usb: dwc3: ep0: handle delayed_status again usb: dwc3: ep0: push ep0state into xfernotready processing usb: dwc3: fix sparse errors usb: dwc3: fix few coding style problems usb: dwc3: move generic dwc3 code from gadget into core usb: dwc3: use a helper function for operation mode setting usb: dwc3: ep0: don't use ep0in for transfers usb: dwc3: ep0: use proper endianess in SetFeature for wIndex usb: dwc3: core: drop DWC3_EVENT_BUFFERS_MAX usb: dwc3: omap: add multiple instances support to OMAP ...
2011-12-12usb: gadget: rename usb_gadget_driver::speed to max_speedMichal Nazarewicz
This commit renames the “speed” field of the usb_gadget_driver structure to “max_speed”. This is so that to make it more apparent that the field represents the maximum speed gadget driver can support. This also make the field look more like fields with the same name in usb_gadget and usb_composite_driver structures. All of those represent the *maximal* speed given entity supports. After this commit, there are the following fields in various structures: * usb_gadget::speed - the current connection speed, * usb_gadget::max_speed - maximal speed UDC supports, * usb_gadget_driver::max_speed - maximal speed gadget driver supports, and * usb_composite_driver::max_speed - maximal speed composite gadget supports. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12usb: gadget: replace usb_gadget::is_dualspeed with max_speedMichal Nazarewicz
This commit replaces usb_gadget's is_dualspeed field with a max_speed field. [ balbi@ti.com : Fixed DWC3 driver ] Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-11-29usb: udc: Fix gadget driver's speed check in various UDC driversMichal Nazarewicz
Several UDC drivers had a gadget driver's speed sanity check of the form of: driver->speed != USB_SPEED_HIGH or: driver->speed != USB_SPEED_HIGH && driver->speed != USB_SPEED_FULL As more and more gadget drivers support USB SuperSpeed, driver->speed may be set to USB_SPEED_SUPER and UDC driver should handle such gadget correctly. The above checks however fail to recognise USB_SPEED_SUPER as a valid speed. This commit changes the two checks to: driver->speed < USB_SPEED_HIGH or: driver->speed < USB_SPEED_FULL respectively. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Reported-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28usb: convert drivers/usb/* to use module_platform_driver()Axel Lin
This patch converts the drivers in drivers/usb/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-18usb: Provide usb_speed_string() functionMichal Nazarewicz
In a few places in the kernel, the code prints a human-readable USB device speed (eg. "high speed"). This involves a switch statement sometimes wrapped around in ({ ... }) block leading to code repetition. To mitigate this issue, this commit introduces usb_speed_string() function, which returns a human-readable name of provided speed. It also changes a few places switch was used to use this new function. This changes a bit the way the speed is printed in few instances at the same time standardising it. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23USB: use usb_endpoint_maxp() instead of le16_to_cpu()Kuninori Morimoto
Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size instead of le16_to_cpu(desc->wMaxPacketSize). This patch fix it up Cc: Armin Fuerst <fuerst@in.tum.de> Cc: Pavel Machek <pavel@ucw.cz> Cc: Johannes Erdfelt <johannes@erdfelt.com> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Oliver Neukum <oliver@neukum.name> Cc: David Kubicek <dave@awk.cz> Cc: Johan Hovold <jhovold@gmail.com> Cc: Brad Hards <bhards@bigpond.net.au> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de> Cc: David Brownell <david-b@pacbell.net> Cc: David Lopo <dlopo@chipidea.mips.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Xie Xiaobo <X.Xie@freescale.com> Cc: Li Yang <leoli@freescale.com> Cc: Jiang Bo <tanya.jiang@freescale.com> Cc: Yuan-hsin Chen <yhchen@faraday-tech.com> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Xiaochen Shen <xiaochen.shen@intel.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: OKI SEMICONDUCTOR, <toshiharu-linux@dsn.okisemi.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Ben Dooks <ben@simtec.co.uk> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Herbert Pötzl <herbert@13thfloor.at> Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: Roman Weissgaerber <weissg@vienna.at> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Tony Olech <tony.olech@elandigitalsystems.com> Cc: Florian Floe Echtler <echtler@fs.tum.de> Cc: Christian Lucht <lucht@codemercs.com> Cc: Juergen Stuber <starblue@sourceforge.net> Cc: Georges Toth <g.toth@e-biz.lu> Cc: Bill Ryder <bryder@sgi.com> Cc: Kuba Ober <kuba@mareimbrium.org> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28usb: gadget: convert all users to the new udc infrastructureSebastian Andrzej Siewior
peripheral drivers are using usb_add_gadget()/usb_del_gadget() to register/unregister to the udc-core. The udc-core will take the first available gadget driver and attach function driver which is calling usb_gadget_register_driver(). This is the same behaviour we have right now. Only dummy_hcd was tested, the others were compiled tested. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Anton Tikhomirov <av.tikhomirov@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Dan Carpenter <error27@gmail.com> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Li Yang <leoli@freescale.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Pavankumar Kondeti <pkondeti@codeaurora.org> Cc: Roy Huang <roy.huang@analog.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> Cc: Xiaochen Shen <xiaochen.shen@intel.com> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com> Cc: cxie4 <cxie4@marvell.com> Cc: linux-geode@lists.infradead.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-06USB: s3c-hsotg: Tone down debuggingMark Brown
Currently the s3c-hsotg driver is extremely chatty, producing voluminous with large register dumps even in default operation. Tone this down so we're not chatty unless DEBUG is defined. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-13USB: s3c-hsotg: return proper error if clk_get failsJingoo Han
Return PTR_ERR(hsotg->clk) instead of -EINVAL if clk_get fails Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-13USB: s3c-hsotg: fix checkpatch warningsJingoo Han
This patch fixes the checkpatch warnings listed below: WARNING: braces {} are not necessary for any arm of this statement WARNING: please, no space before tabs Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-02USB: s3c-hsotg: Add copyright stringAnton Tikhomirov
Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-02USB: s3c-hsotg: Fix hang up after resetAnton Tikhomirov
When File Storage gadget receives SET CONFIGURATION request it tries to cancel all pending transfers. If some request is in progress, gadget waits for its completion. This commit allows gadget to dequeue invalid requests in progress left after reset. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-02USB: s3c-hsotg: Fix stall condition processingAnton Tikhomirov
The following should be done for requests after endpoint stall condition is cleared: 1) 'in progress' request (if any) should be completed since Tx FIFO was flushed; 2) next request from queue (if any) should be started. This commit does that. Additionally set/clear stall condition code is fixed. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-02USB: s3c-hsotg: Fix control request processingAnton Tikhomirov
UDC driver does not need to generate reply to host if request is delivered to gadget. This is gadget's responsibility. This commit fixes that. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-02USB: s3c-hsotg: Fix interrupt cleaning codeAnton Tikhomirov
This commit does the following: 1) clears all pending interrupts before unmasking; 2) clears interrupts as soon as possible to avoid missing next coming that may occur during handling; 3) removes ineffective interrupt cleaning code. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-02USB: s3c-hsotg: Fix core resetAnton Tikhomirov
This patch fixes code responsible for core reset. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>