summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb
Commit message (Collapse)AuthorAgeFilesLines
* staging: octeon-usb: Replace kmalloc with kmalloc_arrayCristina Moraru2015-10-251-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>
* staging: octeon-usb: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-131-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>
* Staging: fixed multiple spelling errors.Carlos E. Garcia2015-05-082-3/+3
| | | | | | | Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: fix unaligned isochronous transfersJohan Hovold2015-04-281-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>
* staging: octeon-usb: make CVMX_WAIT_FOR_FIELD32 to take condition expressionAaro Koskinen2015-04-031-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>
* staging: octeon-usb: assume union type for FIELD32 macrosAaro Koskinen2015-04-031-43/+36Star
| | | | | | | 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>
* staging: octeon-usb: octeon_usb_probe: delete unused variableAaro Koskinen2015-04-031-1/+0Star
| | | | | | | "flags" is not used, delete it. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: make cvmx_fifo_setup voidAaro Koskinen2015-04-031-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>
* stating: octeon-usb: cvmx_usb_initialize(): eliminate extra indentationAaro Koskinen2015-03-241-84/+68Star
| | | | | | | | 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>
* staging: octeon-usb: try to recover from failed hardware resetAaro Koskinen2015-03-241-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>
* staging: octeon-usb: fail and warn if DMA counters are wrongAaro Koskinen2015-03-241-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>
* staging: octeon-usb: move cvmx_usb_shutdown()Aaro Koskinen2015-03-241-34/+32Star
| | | | | | | 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>
* staging: octeon-usb: rewrite port resetAaro Koskinen2015-03-241-25/+3Star
| | | | | | | | 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>
* staging: octeon-usb: move fifo setup to controller reset from port resetAaro Koskinen2015-03-241-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>
* staging: octeon-usb: move fifo setup into a separate routineAaro Koskinen2015-03-241-54/+53Star
| | | | | | | 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>
* staging: octeon-usb: use USB stack to turn on powerAaro Koskinen2015-03-241-10/+9Star
| | | | | | | | 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>
* staging: octeon-usb: don't poll interrupts earlyAaro Koskinen2015-03-241-4/+0Star
| | | | | | | 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>
* staging: octeon-usb: refactor usbn block initAaro Koskinen2015-03-241-32/+25Star
| | | | | | | | | | | 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>
* staging: octeon-usb: never retry after xacterrAaro Koskinen2015-03-241-33/+5Star
| | | | | | | | 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>
* staging: octeon-usb: program DMA engine based on transfer directionAaro Koskinen2015-03-241-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>
* staging: octeon-usb: use __BITFIELD_FIELDAaro Koskinen2015-03-241-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>
* staging: octeon-usb: delete redundant field from octeon_temp_bufferAaro Koskinen2015-03-241-4/+1Star
| | | | | | | | 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>
* staging: octeon-usb: remove useless prefix from pipe flagsAaro Koskinen2015-03-241-17/+16Star
| | | | | | | 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>
* staging: octeon-usb: remove useless prefix from internal routinesAaro Koskinen2015-03-241-219/+205Star
| | | | | | | | | 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>
* staging: octeon-usb: eliminate 64-bit register access wrappersAaro Koskinen2015-03-241-75/+33Star
| | | | | | | | 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>
* staging: octeon-usb: remove internal function parameter sanity checksAaro Koskinen2015-03-241-41/+0Star
| | | | | | | | 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>
* Staging: octeon: constify of_device_id arrayFabian Frederick2015-03-201-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>
* Staging: octeon-usb: Fixed a typoGustavo A. R. Silva2015-01-181-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>
* Merge tag 'staging-3.19-rc1' of ↵Linus Torvalds2014-12-161-28/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 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 ...
| * staging: octeon-usb: eliminate cvmx_dprintf() usageAaro Koskinen2014-11-261-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>
| * staging: octeon-usb: move helper functionsAaro Koskinen2014-11-261-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>
| * staging: octeon-usb: fix checkpatch.pl warningsAleh Suprunovich2014-10-201-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>
| * staging: octeon-usb: use DIV_ROUND_UPTapasweni Pathak2014-10-201-5/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * staging: octeon-usb: Removed unnessecary else after returnSarah Khan2014-10-201-2/+1Star
| | | | | | | | | | | | | | | | 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>
* | staging: octeon-usb: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
|/ | | | | | | 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>
* Staging: octeon-hcd: removed dummy labelNitin Kuppelur2014-09-111-3/+1Star
| | | | | | | | | 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>
* Staging: octeon-hcd: removed unwanted return from voidNitin Kuppelur2014-09-081-9/+0Star
| | | | | | | | | 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>
* staging: octeon-usb: use USB_DIR_INAaro Koskinen2014-09-021-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>
* staging: octeon-usb: use generic control packet headerAaro Koskinen2014-09-021-36/+14Star
| | | | | | | 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>
* staging: octeon-usb: fix endianness bugAaro Koskinen2014-07-091-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>
* staging: octeon-usb: return transferred bytes only on successAaro Koskinen2014-07-091-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>
* staging: octeon-usb: don't retry on data toggle errorAaro Koskinen2014-07-091-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>
* staging: octeon-usb: use usb_hcd_link_urb_to_ep()Aaro Koskinen2014-07-091-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>
* staging: octeon-usb: drop dequeue taskletAaro Koskinen2014-07-091-37/+1Star
| | | | | | | 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>
* staging: Convert __FUNCTION__ to __func__Joe Perches2014-05-251-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>
* staging: octeon-usb: Fix lines with more than 80 chars in octeon-hcd.cPaul Davies C2014-05-231-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>
* staging: octeon-usb: Add blank line after all declarations in octeon-hcd.cPaul Davies C2014-05-231-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>
* staging: octeon-usb: use generic prefetchAaro Koskinen2014-05-231-11/+5Star
| | | | | | | Use generic prefetch. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: delete redudant prefetchesAaro Koskinen2014-05-231-2/+0Star
| | | | | | | | 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>
* Staging:Octeon-usb:octeon-hcd.c return valuePaul McQuade2014-05-231-1/+1
| | | | | | | return value instead of function. Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>