summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: ci13xxx_pci: add langwell/penwell pci idsAlexander Shishkin2012-05-081-0/+2
| | | | | | | Add pci ids for ChipIdea UDC as found in langwell/penwell SoCs. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: gadget: ci13xxx: rename register layoutsAlexander Shishkin2012-05-084-133/+132
| | | | | | | | | | | | | | | | | | | | | | Currently, the register prefixes in the driver seem to be mixed: the capability registers are the ones that contain capability information, such as number of hardware endpoints, while the registers that are used to program the controller are called operational registers. Normally, capability registers start at 0x100 offset of the register window and are followed by operational registers. In some versions, however, capability registers start at 0x0 offset. This patch renames the register and adjusts their offsets appropriately, leaving the possibility of having a non-standard capability offset. I couldn't find any mentions of the TESTMODE register anywhere, so I suspect it might only be enabled in chipidea internal versions of the controller and I'm really inclined to remove it from the driver or at least hiding it behind a config option. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: gadget: ci13xxx: initialize ep0{out,in} dynamicallyAlexander Shishkin2012-05-082-21/+30
| | | | | | | | Change ep0{out,in} macros into dynamically assigned pointers in gadget initialization time. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: gadget: ci13xxx: fix ep list removal in gadget unregistering codeAlexander Shishkin2012-05-081-1/+1
| | | | | | | | | Since ep0{out,in} are never on gadget's ep_list, there's no need to try to unlink them, even more so because ep_list linkage is not initialized for these endpoints. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ohci-da8xx: set MODULE_ALIAS to allow autoloadingJan Luebbe2012-05-081-0/+2
| | | | | | | | | The Davinci USB platform device (in mach-davinci/usb.c) uses "ohci" as the name. To allow autoloading of the relevant driver, the module needs to set the MODULE_ALIAS. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: make vendor id of root hubs greppablePaul Bolle2012-05-071-3/+3
| | | | | | | | | It took me surprisingly long to find the location where the Linux Foundation vendor id (0x1d6b) is set for the root hubs. A minor update to three comments makes those locations (trivially) greppable. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: ffs-test: fix length argument of out function callMatthias Fend2012-05-071-1/+1
| | | | | | | | | | | The out functions should only handle actual available data instead of the complete buffer. Otherwise for example the ep0_consume function will report ghost events since it tries to decode the complete buffer - which may contain partly invalid data. Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net> Cc: stable <stable@vger.kernel.org> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: xhci: testing sizeof xhci_doorbell_array 2 timegirish verma2012-05-071-1/+0
| | | | | | | | | | | | Testing BUILD_BUG_ON xhci_doorbell_array structure 2 time, redundant statement Signed-off-by: Girish Verma <girish.gcet@gmail.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>  --- drivers/usb/host/xhci.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: xhci-hcd: print URB's expected length in decimal, not hexAlan Stern2012-05-071-1/+1
| | | | | | | | | | | | This patch changes the output format specifier of a debugging line in the xhci-hcd driver. An URB's transfer_buffer_length should be printed in decimal; there's no reason to print it in hex. Especially since the actual_length value, printed earlier on the same line, is already in decimal. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: ftdi-sio: add support for Physik Instrumente E-861Éric Piel2012-05-072-0/+9
| | | | | | | | | | | This adds VID/PID for the PI E-861. Without it, I had to do: modprobe -q ftdi-sio product=0x1008 vendor=0x1a72 http://www.physikinstrumente.com/en/products/prdetail.php?sortnr=900610 Signed-off-by: Éric Piel <piel@delmic.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: remove bizarre generic_serial probe functionGreg Kroah-Hartman2012-05-073-18/+1
| | | | | | | | | | | | I can't remember why I wrote it like this many many years ago, but it's not needed at all, let's rely on the usb-serial core for this function, especially as it is being overridden by it anyway. This lets us make usb_serial_probe() a static function, which it should be. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: sierra: remove reset_resume callbackGreg Kroah-Hartman2012-05-071-8/+0
| | | | | | | | | | | | This really just is the resume callback for the device, so use that, especially as the usb-serial core just overrode this callback so it wasn't being made anyway. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Johan Hovold <jhovold@gmail.com> Cc: Anton Samokhvalov <pg83@yandex.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: ch341: remove reset_resume callbackGreg Kroah-Hartman2012-05-071-10/+4
| | | | | | | | | | | | This really just is the resume callback for the device, so use that, especially as the usb-serial core just overrode this callback so it wasn't being made anyway. Cc: Johan Hovold <jhovold@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: remove usb_serial_disconnect call in all driversGreg Kroah-Hartman2012-05-0754-66/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is now set by the usb-serial core, no need for the driver to individually set it. Thanks to Alan Stern for the idea to get rid of it. Cc: William Greathouse <wgreathouse@smva.com> Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Peter Berger <pberger@brimson.com> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Gary Brubaker <xavyer@ix.netcom.com> Cc: Oliver Neukum <oliver@neukum.name> Cc: Matthias Urlichs <smurf@smurf.noris.de> Cc: Support Department <support@connecttech.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Kautuk Consul <consul.kautuk@gmail.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Bart Hartgers <bart.hartgers@gmail.com> Cc: Johan Hovold <jhovold@gmail.com> Cc: Preston Fick <preston.fick@silabs.com> Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Cc: Simon Arlott <simon@fire.lp0.eu> Cc: Andrew Worsley <amworsley@gmail.com> Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Aleksey Babahin <tamerlan311@gmail.com> Cc: Dan Carpenter <error27@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Donald Lee <donald@asix.com.tw> Cc: Julia Lawall <julia@diku.dk> Cc: Michal Sroczynski <msroczyn@gmail.com> Cc: Wang YanQing <Udknight@gmail.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Thomas Tuttle <ttuttle@chromium.org> Cc: Rigbert Hamisch <rigbert@gmx.de> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: remove usb_serial_probe call in all driversGreg Kroah-Hartman2012-05-0752-52/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is now set by the usb-serial core, no need for the driver to individually set it. Thanks to Alan Stern for the idea to get rid of it. Cc: William Greathouse <wgreathouse@smva.com> Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Peter Berger <pberger@brimson.com> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Gary Brubaker <xavyer@ix.netcom.com> Cc: Oliver Neukum <oliver@neukum.name> Cc: Matthias Urlichs <smurf@smurf.noris.de> Cc: Support Department <support@connecttech.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Kautuk Consul <consul.kautuk@gmail.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Bart Hartgers <bart.hartgers@gmail.com> Cc: Johan Hovold <jhovold@gmail.com> Cc: Preston Fick <preston.fick@silabs.com> Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Cc: Simon Arlott <simon@fire.lp0.eu> Cc: Andrew Worsley <amworsley@gmail.com> Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Aleksey Babahin <tamerlan311@gmail.com> Cc: Dan Carpenter <error27@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Donald Lee <donald@asix.com.tw> Cc: Julia Lawall <julia@diku.dk> Cc: Michal Sroczynski <msroczyn@gmail.com> Cc: Wang YanQing <Udknight@gmail.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Thomas Tuttle <ttuttle@chromium.org> Cc: Rigbert Hamisch <rigbert@gmx.de> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb-serial: clean up unneeded PM-related fieldsAlan Stern2012-05-077-24/+0
| | | | | | | | | | | | | | | This patch (as1551) cleans up the PM-related entries in the usb_driver structures of the various USB serial driver modules. Those entries are now filled in by the usb-serial core during driver registration, so they don't need to be initialized explicitly in the source code. The same is true of the one remaining no_dynamic_id entry. reset_resume remains a small problem, because the serial core doesn't support it. The patch ignores these entries. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb-serial: ftdi_sio: fix oops during autosuspendAlan Stern2012-05-071-2/+7
| | | | | | | | | | | | | | | | | | | | | | | This patch (as1550) fixes a bug in the usb-serial core that affects the ftdi_sio driver and most likely others as well. The core implements suspend and resume routines, but it doesn't store pointers to those routines in the usb_driver structures that it registers, even though it does set those drivers' supports_autosuspend flag. The end result is that when one of these devices is autosuspended, we try to call through a NULL pointer. The patch fixes the problem by setting the suspend and resume method pointers to the appropriate routines in the USB serial core, along with the supports_autosuspend field, in each driver as it is registered. This should be back-ported to all the stable kernels that have the new usb_serial_register_drivers() interface. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-and-tested-by: Frank Schäfer <schaefer.frank@gmx.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'dwc3-for-v3.5' of ↵Greg Kroah-Hartman2012-05-079-84/+325
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next usb: dwc3: patches for v3.5 merge window This pull request contains one workaround for a Silicon Issue found on all RTL releases prior to 2.20a, which would cause a metastability state on Run/Stop bit. We also have some patches implementing a few extra Standard requests introduced by USB3 spec (Set SEL and Set Isoch Delay), as well as one patch, which has been pending for a long time, implementing LPM support. Last, but not least, we are splitting the host address space out of the dwc3 core driver otherwise xHCI won't be able to request_mem_region() its own address space. This patch is only needed because we are (as we should) re-using the xHCI driver, which is a completely separate module. Together with these three big changes, come a few extra preparatory patches which most move code around, define macros and so on, as well as a fix for Isochronous transfers which hasn't been triggered before. [ resolved conflicts and build error in drivers/usb/dwc3/gadget.c - gregkh]
| * usb: dwc3: define DWC3_EP0_BOUNCE_SIZEFelipe Balbi2012-05-042-6/+8
| | | | | | | | | | | | | | | | to avoid sprinkling magic constants on the driver we define a constant to be used when allocating setup_buffer and ep0_bounce buffer. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: gadget: issue Update Transfer command after queuing isoc requestPaul Zimmerman2012-05-021-17/+28
| | | | | | | | | | | | | | | | | | | | | | Issue an Update Transfer command after queuing a request to an isoc EP with an active transfer. This is required according to the dwc3 databook. Pratyush Anand reports that this fixes a problem he was having with Isoc IN transfers. Tested-by: Pratyush Anand<pratyush.anand@st.com> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: ep0: implement support for Set Isoch Delay requestFelipe Balbi2012-05-022-0/+28
| | | | | | | | | | | | | | | | | | This is basically a noop for DWC3. We don't have to do anything. Basically we test if the request parameters are correct, cache the Isochronous Delay and return success. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: gadget: increase setup buffer sizeFelipe Balbi2012-05-021-2/+1
| | | | | | | | | | | | | | | | | | We want to re-use that buffer for other USB requests, so let's increase it to biggest wMaxPacketSize for ep0 so it works for everything we have in mind. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: ep0: implement Set SEL supportFelipe Balbi2012-05-022-0/+93
| | | | | | | | | | | | | | | | | | This patch implements Set SEL Standard Request support for dwc3 driver. It needs to issue a command to the controller passing the timing we received on the data phase of the Set SEL request. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: gadget: implement Global Command supportFelipe Balbi2012-05-023-2/+32
| | | | | | | | | | | | | | This will be used by the ep0 layer for implementing Set SEL Standard Request. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: ch9: define Set SEL and Set Isoch Delay macrosFelipe Balbi2012-04-301-0/+2
| | | | | | | | | | | | | | | | These are new requests introduced by USB 3.0 Specification. Gadget controllers should implement them. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: ep0: add LPM handlingSebastian Andrzej Siewior2012-04-303-11/+45
| | | | | | | | | | | | | | | | | | | | On device loading the driver enables LPM and the acceptance of U1 and U2 states. The [Set|Clear]Feature requests for "U1/U2" are forwarded directly to the hardware and allow / forbid the initiation of the low power links. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: core: split host address spaceIdo Shayevitz2012-04-244-35/+46
| | | | | | | | | | | | | | | | | | This fix prevents a problem with dwc3 and host mode where we were requesting the entire memory region in dwc3/core.c, thus preventing xhci-plat from ever ioremapping its own address space. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: omap: add dwc3_omap_readl/writel functionsIdo Shayevitz2012-04-241-11/+21
| | | | | | | | | | | | | | | | | | We separate between dwc3-omap helper functions to dwc3-core helper functions. This will allow us to change the helper functions implementation according to each module need. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: workaround: metastability state on Run/Stop bitFelipe Balbi2012-04-111-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | All revisions prior to 2.20a have a known issue which causes metastability state on Run/Stop bit if we configure the core to work on any of the USB2-only speeds. The suggested workaround is just to never configure the core to anything other than SuperSpeed. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: core: define more revision macrosFelipe Balbi2012-04-111-0/+4
| | | | | | | | | | | | | | | | We have other revisions already released, let's define revision macros for those so we can do runtime detection of known erratas. Signed-off-by: Felipe Balbi <balbi@ti.com>
* | Merge tag 'musb-for-v3.5' of ↵Greg Kroah-Hartman2012-05-074-2/+722
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next usb: musb: patches for v3.5 merge window MUSB has only two patches for this merge window adding support for TI's TI81xx platforms which contains two MUSB IP instances. Nothing scary here, just yet another glue layer for MUSB.
| * | usb: musb: enable support for am335xAjay Kumar Gupta2012-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | Enabled the flag so that musb_dsps glue file can be used for am335x Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: Add support for ti81xx platformAjay Kumar Gupta2012-05-044-2/+722
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TI81XX platform has two musb interfaces and uses CPPI4.1 DMA engine. It has builtin USB PHYs as AM35x. The current set of patches adds support for one instance and only in PIO mode. [ balbi@ti.com : make it compile and solve a "may be used uninitialized" warning ] Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Ravi Babu <ravibabu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | | Merge tag 'gadget-for-v3.5' of ↵Greg Kroah-Hartman2012-05-0759-2139/+2221
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next usb: gadget: patches for v3.5 This pull request is quite big, but mainly because there's a giant rework of the s3c_hsotg.c driver to make it friendlier for other users. Samsung Exynos platforms use the DesignWare Core USB2 IP from Synopsys so it's a bit unfair to have the driver work for Samsung platforms only. In short, the big rework is in preparation to make the driver more reusable. Another big rework in this pull request came from Ido, where he's removing the redundant pointer for the endpoint descriptor from the controller driver's own endpoint representation. The same pointer is available through the generic struct usb_ep structure. Also on this pull request is the conversion of a few extra controller drivers to the new style registration, which allows multiple controllers to be available on the same platform and helps remove global pointers from those drivers. Together with those big changes, there's the usual fixes and cleanups to gadget drivers. Nothing major.
| * | | usb:hsotg:samsung: err_irq: support for probe functionLukasz Majewski2012-05-041-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Use clk_prepare_enable and clk_disable_unprepareLukasz Majewski2012-05-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Remove the S3C_ prefix from registers definition.Lukasz Majewski2012-05-042-677/+675
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Add release function for hsotg deviceLukasz Majewski2012-05-041-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Remove our_hsotg global pointerLukasz Majewski2012-05-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Comments reorganization and cleanupLukasz Majewski2012-05-041-122/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Use new udc_start and udc_stop callbacksLukasz Majewski2012-05-041-25/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Determine number of EPs from HW configuration registerLukasz Majewski2012-05-041-67/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Cable disconnection recovery codeLukasz Majewski2012-05-041-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Rename s3c_hsotg_disconnect functionLukasz Majewski2012-05-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Remove Disconnect Interrupt handlerLukasz Majewski2012-05-041-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Extract core initialization functionLukasz Majewski2012-05-041-161/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Sending ZLP packet for IN EP0 transfersLukasz Majewski2012-05-041-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: NAK management for EP0 (Setup stage of control transfers)Lukasz Majewski2012-05-041-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Use of regulator_bulk_* functions for USB regulatorsLukasz Majewski2012-05-041-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | usb:hsotg:samsung: Wrappers for USB PHY methodsLukasz Majewski2012-05-041-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud