aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-10-24staging: octeon-usb: Replace kmalloc with kmalloc_arrayCristina Moraru1-3/+3
Replace kmalloc with specialized function kmalloc_array when the size is a multiplication of: number_of_elements * size_of_element Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: octeon-usb: Fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia2-3/+3
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-28staging: octeon-usb: fix unaligned isochronous transfersJohan Hovold1-3/+9
Make sure to copy the whole transfer buffer when releasing the temporary buffer used for unaligned isochronous transfers as the data is not necessarily contiguous in that case. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: octeon-usb: make CVMX_WAIT_FOR_FIELD32 to take condition expressionAaro Koskinen1-5/+6
Make CVMX_WAIT_FOR_FIELD32 to take full condition expression. This should make the usage simpler, and the macro more readable. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: octeon-usb: assume union type for FIELD32 macrosAaro Koskinen1-43/+36
Assume union type for FIELD32 macros to simplify usage. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: octeon-usb: octeon_usb_probe: delete unused variableAaro Koskinen1-1/+0
"flags" is not used, delete it. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: octeon-usb: make cvmx_fifo_setup voidAaro Koskinen1-1/+1
Make cvmx_fifo_setup void, it does not return any value. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24stating: octeon-usb: cvmx_usb_initialize(): eliminate extra indentationAaro Koskinen1-84/+68
Eliminate extra indentation by putting all the code into the same block. Also delete a bogus comment. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: try to recover from failed hardware resetAaro Koskinen1-3/+27
On some hardware the USB fails to initialize to sane state after cold boot. We can detect this based on some unexpected interrupt bits, and recover by re-initializing. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: fail and warn if DMA counters are wrongAaro Koskinen1-0/+11
Fail and WARN if DMA counters are wrong. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: move cvmx_usb_shutdown()Aaro Koskinen1-34/+32
Move cvmx_usb_shutdown() to allow its use from some other functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: rewrite port resetAaro Koskinen1-25/+3
Don't disable port before resetting. Also perform reset unconditionally when requested. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: move fifo setup to controller reset from port resetAaro Koskinen1-2/+2
Move FIFO setup to controller reset from port reset. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: move fifo setup into a separate routineAaro Koskinen1-54/+53
Move FIFO setup into a separate routine. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: use USB stack to turn on powerAaro Koskinen1-10/+9
Use USB stack to turn on the power bit. It will also do the necessary delays. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: don't poll interrupts earlyAaro Koskinen1-4/+0
Don't poll interrupts before we have registered the HCD. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: refactor usbn block initAaro Koskinen1-32/+25
Move one-time state data structure initialization out of cvmx_usb_initialize(). This enables to re-initialize USBN HW block without messing up data structures. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: never retry after xacterrAaro Koskinen1-33/+5
Never retry after xacterr. The DMA engine cannot handle that properly and may result in wrong transfer count and hang. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: program DMA engine based on transfer directionAaro Koskinen1-7/+7
Program DMA engine based on transfer direction. We are only transferring to one direction at a time. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: use __BITFIELD_FIELDAaro Koskinen1-243/+270
Use __BITFIELD_FIELD to define bitfields. OCTEON can at least in theory run also in little-endian mode, so the bitfield definitions should not assume big-endian byte order. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: delete redundant field from octeon_temp_bufferAaro Koskinen1-4/+1
Since we are not moving/realigning the original pointer returned by kmalloc, we don't need to store the value in a separate field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: remove useless prefix from pipe flagsAaro Koskinen1-17/+16
Remove useless prefix from pipe flags and adjust comments. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: remove useless prefix from internal routinesAaro Koskinen1-219/+205
Original CVMX code used "__" to distinguis internal USB functions from public ones. But in Linux all cvmx_usb routines are internal to this driver, so such separation is useless. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: eliminate 64-bit register access wrappersAaro Koskinen1-75/+33
Eliminate 64-bit register access wrappers. Since we don't implement register-level debugging outputs, these are useless. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: remove internal function parameter sanity checksAaro Koskinen1-41/+0
Remove some function parameter sanity checks from internal functions where we can rely them being called with sane parameters. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20Staging: octeon: constify of_device_id arrayFabian Frederick1-1/+1
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17Staging: octeon-usb: Fixed a typoGustavo A. R. Silva1-1/+1
Fixed a typo in octeon-hcd.c file Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-15Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-28/+41
Pull staging driver updates from Greg KH: "Here's the big staging tree pull request for 3.19-rc1. We continued to delete more lines than were added, always a good thing, but not at a huge rate this release, only about 70k lines removed overall mostly from removing the horrid bcm driver. Lots of normal staging driver cleanups and fixes all over the place, well over a thousand of them, the shortlog shows all the horrid details. The "contentious" thing here is the movement of the Android binder code out of staging into the "real" part of the kernel. This is code that has been stable for a few years now and is working as-is in the tens of millions of devices with no issues. Yes, the code is horrid, and the userspace api leaves a lot to be desired, but it's not going to change due to legacy issues that we have no control over. Because so many devices and companies rely on this, and the code is stable, might as well promote it out of staging. This was all discussed at the Linux Plumbers conference, and everyone participating agreed that this was the best way forward. There is work happening to replace the binder code with something new that is happening right now, but I don't expect to see the results of that work for another year at the earliest. If that ever happens, and Android switches over to it, I'll gladly remove this version. As for maintainers, I'll be glad to maintain this code, I've been doing it for the past few years with no problems. I'll send a MAINTAINERS entry for it before 3.19-final is out, still need to talk to the Google developers about if they are willing to help with it or not, last I checked they were, which was good. All of these patches have been in linux-next for a while with no reported issues" * tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits) Staging: slicoss: Fix long line issues in slicoss.c staging: rtl8712: remove unnecessary else after return staging: comedi: change some printk calls to pr_err staging: rtl8723au: hal: Removed the extra semicolon lustre: Deletion of unnecessary checks before three function calls staging: lustre: fix sparse warnings: static function declaration staging: lustre: fixed sparse warnings related to static declarations staging: unisys: remove duplicate header staging: unisys: remove unneeded structure staging: ft1000 : replace __attribute ((__packed__) with __packed drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c" Drivers:staging:rtl8192e: Fixed checkpatch warning Drivers:staging:clocking-wizard: Added a newline staging: clocking-wizard: check for a valid clk_name pointer staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1() staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB() staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation ...
2014-11-26staging: octeon-usb: eliminate cvmx_dprintf() usageAaro Koskinen1-3/+9
Eliminate cvmx_dprintf() usage and use dev_err() instead. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: octeon-usb: move helper functionsAaro Koskinen1-10/+10
Move helper functions to make them visible to all functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: octeon-usb: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20staging: octeon-usb: fix checkpatch.pl warningsAleh Suprunovich1-8/+17
fixed several 'line over 80 characters' in places where it can be done without changing/refactoring code Signed-off-by: Aleh Suprunovich <br@ahlamon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: octeon-usb: use DIV_ROUND_UPTapasweni Pathak1-5/+4
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. Coccinelle script used : // <smpl> @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( - (n + d - 1) / d + DIV_ROUND_UP(n,d) | - (n + (d - 1)) / d + DIV_ROUND_UP(n,d) ) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP((n),d) + DIV_ROUND_UP(n,d) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP(n,(d)) + DIV_ROUND_UP(n,d) // </smpl> Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: octeon-usb: Removed unnessecary else after returnSarah Khan1-2/+1
WARNING: else is generally not useful after return or break checkpatch.pl warning in octeon-hcd.c Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11Staging: octeon-hcd: removed dummy labelNitin Kuppelur1-3/+1
This is a patch to the octeon-hcd.c file that fixes removes dummy label i.e. label followed by return of void function Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08Staging: octeon-hcd: removed unwanted return from voidNitin Kuppelur1-9/+0
This is a patch to the octeon-hcd.c file that fixes checkpatch.pl warning by removing return statement from void functions. Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-02staging: octeon-usb: use USB_DIR_INAaro Koskinen1-7/+7
Replace a magic value with #defined macro. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-02staging: octeon-usb: use generic control packet headerAaro Koskinen1-36/+14
Use generic control packet header structure definition. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: fix endianness bugAaro Koskinen1-1/+1
wHubCharacteristics gets wrong value on big-endian CPUs. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: return transferred bytes only on successAaro Koskinen1-1/+5
Return transferred bytes only when transfer was successful. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: don't retry on data toggle errorAaro Koskinen1-2/+3
On data toggle error, we don't know if and how many bytes were successfully transferred by DMA. We should just fail the transaction instead of trying a retry. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: use usb_hcd_link_urb_to_ep()Aaro Koskinen1-1/+17
The driver did not use link_urb_to_ep() / unlink_urb_from_ep(). This caused odd behaviour in some error recovery situations, all requests would start to fail after the first failure. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: octeon-usb: drop dequeue taskletAaro Koskinen1-37/+1
Cancel requests synchronously instead of using the dequeue tasklet. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25staging: Convert __FUNCTION__ to __func__Joe Perches1-1/+1
Use the normal mechanism for emitting a function name. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: Fix lines with more than 80 chars in octeon-hcd.cPaul Davies C1-23/+66
Some lines with more than 80 characters are converted in to multiple lines. Signed-off-by: Paul Davies C <pauldaviesc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: Add blank line after all declarations in octeon-hcd.cPaul Davies C1-2/+17
Add blank lines after each declarations in drivers/staging/octeon-usb/octeon-hcd.c. Signed-off-by: Paul Davies C <pauldaviesc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: use generic prefetchAaro Koskinen1-11/+5
Use generic prefetch. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: octeon-usb: delete redudant prefetchesAaro Koskinen1-2/+0
cvmx_usb_pipe fits into a cache-line so additional prefetches are not really helping anything. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23Staging:Octeon-usb:octeon-hcd.c return valuePaul McQuade1-1/+1
return value instead of function. Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>