summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'staging-3.19-rc1' of ↵Linus Torvalds2014-12-151-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/+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>
| * staging: octeon-usb: Removed unnessecary else after returnSarah Khan2014-10-201-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>
* | staging: octeon-usb: drop owner assignment from platform_driversWolfram Sang2014-10-201-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>
* Staging: octeon-hcd: removed dummy labelNitin Kuppelur2014-09-111-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>
* Staging: octeon-hcd: removed unwanted return from voidNitin Kuppelur2014-09-081-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>
* 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/+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>
* staging: octeon-usb: fix endianness bugAaro Koskinen2014-07-081-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-081-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-081-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-081-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-081-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>
* 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-241-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-241-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-241-11/+5
| | | | | | | 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-241-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>
* 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>
* staging: octeon-usb: prevent memory corruptionAaro Koskinen2014-03-201-0/+108
| | | | | | | | | | | | | | | | | | octeon-hcd will crash the kernel when SLOB is used. This usually happens after the 18-byte control transfer when a device descriptor is read. The DMA engine is always transfering full 32-bit words and if the transfer is shorter, some random garbage appears after the buffer. The problem is not visible with SLUB since it rounds up the allocations to word boundary, and the extra bytes will go undetected. Fix by providing quirk functions for DMA map/unmap that allocate a bigger temporary buffer when necessary. Tested by booting EdgeRouter Lite to USB stick root file system with SLAB, SLOB and SLUB kernels. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=72121 Reported-by: Sergey Popov <pinkbyte@gentoo.org> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: octeon-usb: Remove unnecessary bracketsRaluca Oncioiu2014-03-071-3/+3
| | | | | | | | | Remove brackets from single line branches of if statements. Break long lines. Signed-off-by: Raluca Oncioiu <raluca.oncioiu91@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: octeon-usb: Break up long linesRaluca Oncioiu2014-03-071-202/+436
| | | | | | | Break up long lines. Signed-off-by: Raluca Oncioiu <raluca.oncioiu91@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: Probe via device tree populated platform device.David Daney2014-02-071-157/+116
| | | | | | | | | | Extract clocking parameters from the device tree, and remove now dead code and types. Signed-off-by: David Daney <david.daney@cavium.com> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: hcd: move controller wakeup setting initialization to individual driverPeter Chen2013-12-081-0/+1
| | | | | | | | | | | | | | | Individual controller driver has different requirement for wakeup setting, so move it from core to itself. In order to align with current etting the default wakeup setting is enabled (except for chipidea host). Pass compile test with below commands: make O=outout/all allmodconfig make -j$CPU_NUM O=outout/all drivers/usb Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: use list.h for transactionsAaro Koskinen2013-10-111-41/+36
| | | | | | | Use list.h helpers for transactions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: use list.h for pipesAaro Koskinen2013-10-111-81/+24
| | | | | | | Use list.h helpers for pipes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: use list_for_each_entry_safe()Aaro Koskinen2013-10-111-2/+3
| | | | | | | Use list_for_each_entry_safe() when deleting all list items. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: use list_del_init()Aaro Koskinen2013-10-111-8/+3
| | | | | | | Replace list_del() + INIT_LIST_HEAD() with list_del_init(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: use dynamic allocation for pipesAaro Koskinen2013-10-111-37/+3
| | | | | | | Use dynamic memory allocation for pipes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: use dynamic allocation for transactionsAaro Koskinen2013-10-111-73/+2
| | | | | | | Use dynamic memory allocation for transactions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: use a single .h fileAaro Koskinen2013-10-113-365/+312
| | | | | | | | | Merge USBC and USBN register definitions into a single header file. Although all HW definitions are purely internal to the driver, it's better to keep them separate due to the large size of the file. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: CN3xxx: program p_xenbn and p_rclk through p_rtypeAaro Koskinen2013-10-112-108/+25
| | | | | | | | Do the clock setup through p_rtype on all OCTEONs. This enables to get rid of duplicated register definitions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: delete cvmx_usbnx_clk_ctl_cn50xxAaro Koskinen2013-10-112-98/+15
| | | | | | | | Add the missing bits to common clk ctl definition, and we can delete duplicated definitions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: delete unused cvmx_usbnx_usbp_ctl_status definitionsAaro Koskinen2013-10-111-382/+0
| | | | | | | | cvmx_usbnx_usbp_ctl_status was multiplied for different OCTEONS and all those definitions are unused. Delete them. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: refactor __cvmx_usb_pipe_needs_splitAaro Koskinen2013-10-061-1/+2
| | | | | | | Split a long line and remove redundant parenthesis. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: eliminate submit_handleAaro Koskinen2013-10-061-142/+90
| | | | | | | Eliminate submit_handle, use a direct reference instead. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: eliminate pipe_handleAaro Koskinen2013-10-061-129/+92
| | | | | | | Eliminate pipe_handle, use a direct reference instead. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: clean up hcpriv usageAaro Koskinen2013-10-061-6/+6
| | | | | | | | Use ep->hcpriv for pipe handle and urb->hcpriv for submit handle, instead of packing both into the same field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: cvmx_usb_submit_control: get params from urbAaro Koskinen2013-10-061-46/+10
| | | | | | | Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: cvmx_usb_submit_interrupt: get params from urbAaro Koskinen2013-10-061-21/+5
| | | | | | | Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: cvmx_usb_submit_control: get params from urbAaro Koskinen2013-10-061-27/+6
| | | | | | | Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: cvmx_usb_submit_bulk: get params from urbAaro Koskinen2013-10-061-20/+4
| | | | | | | Get the transfer parameters from urb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: replace generic transfer callback data with urbAaro Koskinen2013-10-061-24/+19
| | | | | | | URB is always passed, so we can use strong typing here. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: call transfer completion callback directlyAaro Koskinen2013-10-061-243/+111
| | | | | | | The callback is always the same, we can just call it directly. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: call port change callback directlyAaro Koskinen2013-10-061-101/+31
| | | | | | | Call port change callback directly. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: inline cvmx_usb_set_statusAaro Koskinen2013-10-061-27/+5
| | | | | | | Inline a trivial function. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: octeon-usb: eliminate cvmx_usb_internal_stateAaro Koskinen2013-10-061-133/+77
| | | | | | | | | Eliminate cvmx_usb_internal_state, just use cvmx_usb_state everywhere. This also enables to allocate only the needed amount of data for the USB internal state, instead of always allocating 64 KB. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud