An error occurred fetching the project authors.
- 06 Sep, 2012 1 commit
-
-
Julia Lawall authored
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:
Felipe Balbi <balbi@ti.com>
-
- 03 Sep, 2012 1 commit
-
-
Sachin Kamat authored
devm_* functions are already used in this file. Hence convert clk_get to devm_clk_get for completeness. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
- 23 Aug, 2012 1 commit
-
-
Du, Changbin authored
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>
-
- 15 Aug, 2012 1 commit
-
-
Julia Lawall authored
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>
-
- 02 Jul, 2012 1 commit
-
-
Alexandre Pereira da Silva authored
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>
-
- 22 Jun, 2012 1 commit
-
-
Lukasz Majewski authored
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>
-
- 15 Jun, 2012 3 commits
-
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
- 04 Jun, 2012 1 commit
-
-
Sachin Kamat authored
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>
-
- 09 May, 2012 1 commit
-
-
Lukasz Majewski authored
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>
-
- 04 May, 2012 18 commits
-
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
Lukasz Majewski authored
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>
-
- 10 Apr, 2012 4 commits
-
-
Anton Tikhomirov authored
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>
-
Anton Tikhomirov authored
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>
-
Anton Tikhomirov authored
MPS field of DOEPCTL0 is read only. Signed-off-by:
Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by:
Felipe Balbi <balbi@ti.com>
-
Anton Tikhomirov authored
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>
-
- 12 Dec, 2011 2 commits
-
-
Michal Nazarewicz authored
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>
-
Michal Nazarewicz authored
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>
-
- 29 Nov, 2011 1 commit
-
-
Michal Nazarewicz authored
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>
-
- 27 Nov, 2011 1 commit
-
-
Axel Lin authored
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>
-
- 18 Sep, 2011 1 commit
-
-
Michal Nazarewicz authored
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>
-
- 23 Aug, 2011 1 commit
-
-
Kuninori Morimoto authored
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>
-
- 28 Jun, 2011 1 commit
-
-
Sebastian Andrzej Siewior authored
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>
-