summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xillybus
Commit message (Collapse)AuthorAgeFilesLines
* xillybus: Move out of stagingEli Billauer2014-09-238-3103/+0
| | | | | | | | | | | | This driver has been functional and stable throughout the year it has spent in the staging area. It has been patched for minor bugs, coding style issues and improvements during this period. This is the second submission of this move-out, after making several style improvements, as suggested by Dan Carpenter. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed unnecessary castEli Billauer2014-09-081-1/+1
| | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Blank lines add/removeEli Billauer2014-09-082-22/+2
| | | | | | | | | | | | * Blank lines between a function call and its return status check were removed. * Double blank lines were removed. * Blank lines were added and removed as to silence checkpatch.pl --strict Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Fix indentationsEli Billauer2014-09-082-30/+30
| | | | | | Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Trivial coding style fixesEli Billauer2014-09-081-4/+3
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Reorganize line breaks for clarityEli Billauer2014-09-081-16/+13
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Fix commentsEli Billauer2014-09-081-7/+8
| | | | | | | | | Trivial comments removed, and one comment clarified Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Added curly brackets as requiredEli Billauer2014-09-082-5/+7
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Clarified the stop condition for a loopEli Billauer2014-09-081-2/+2
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use the return value of wait_event_interruptibleEli Billauer2014-09-081-19/+19
| | | | | | | | | | | Rather than checking the wait condition, the return value of wait_event_interruptible() and wait_event_interruptible_timeout() is used. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Fixes related to "rc" variableEli Billauer2014-09-083-32/+15
| | | | | | | | | | | "rc" is often used to hold the return value of a function call. This patch removes unnecessary assignments to this variable, and makes a few related execution flow improvements. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: EAGAIN status handling improvementEli Billauer2014-09-081-5/+11
| | | | | | | | | | The -EAGAIN status is passed through an "rc" variable instead of a less common flow. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Improved goto flow for error handlingEli Billauer2014-09-081-6/+6
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Improved error handlingEli Billauer2014-09-081-12/+8
| | | | | | | | | | xilly_scan_idt() now returns an error status code, rather than being a void function and hint the status through an entry in a data structure. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed unnecessary error messageEli Billauer2014-09-081-9/+4
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed unnecessary warning messageEli Billauer2014-09-081-8/+2
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Non-interruptible mutex_lock() on release methodEli Billauer2014-09-081-14/+2
| | | | | | | | | | | | Responding to an interrupt while handling the "release" method can't end well anyhow. In practical cases, this can force the user to wait up to one second while flushing remaining data is attempted (a timeout on the flush mechanism limits the time for flushing). Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use SEEK_* predefined constantsEli Billauer2014-09-081-3/+3
| | | | | | | Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use devm_kcalloc() for arraysEli Billauer2014-09-081-8/+8
| | | | | | | | | Replace devm_kzalloc where it applies. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed read barrier at beginning of ISREli Billauer2014-08-301-8/+0
| | | | | | | | The comment (also removed) explains why it was there in the first place, but that doesn't make much sense. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed unnecessary smp_wmb()Eli Billauer2014-08-301-4/+0
| | | | | | | These memory barriers were added "just to be safe". Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed write memory barriers before wait_event_*()Eli Billauer2014-08-301-4/+1
| | | | | | | | According to Documentation/memory-barriers.txt, a memory barrier is put in place by wait_event_*() Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed mmiowb() as iowrite32() is orderedEli Billauer2014-08-301-15/+2
| | | | | | | | mmiowb() was used to make sure that iowrite32() take place in the correct order, which is an unnecessary precuation. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed mmiowb() before mutex_unlock()Eli Billauer2014-08-301-4/+0
| | | | | | | | | | | The relevant sequences consist of two I/O memory writes. The second write depends on the first one. mmiowb() was inserted to make sure that no other thread inserts a "first write" before the current one finished its second. As a mutex protects this critical sequence, mmiowb() is unnecessary. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Remove mmiowb() before wait_event_*() callsEli Billauer2014-08-301-3/+0
| | | | | | | | According to Documentation/memory-barriers.txt, a memory barrier is put in place by wait_event_*() Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed outdated part in READMEEli Billauer2014-07-171-23/+0
| | | | | | | | The dedicated memory management routines have been replaced with devres API, so the related part is removed from the doc. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Fix if-else coding style errorsEli Billauer2014-07-171-3/+4
| | | | | | | | | According to Documentation/CodingStyle, when one branch of an if-else statement has multiple statements, both branches should be enclosed in curly brackets. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: fix some coding style errorsVincent Bernat2014-07-161-8/+5
| | | | | | | | | | | This includes: - keep "else" on the same line as the closing brace - don't use "else" after "return" - don't issue a message for an out-of-memory error - blank line after a declaration Signed-off-by: Vincent Bernat <vincent@bernat.im> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Register's address offset notation updateEli Billauer2014-07-092-45/+45
| | | | | | | | | | | In iowrite32() calls, the address of registers was expressed as e.g. &ep->registers[fpga_msg_ctrl_reg]. This changes to the more common format e.g. ep->registers + fpga_msg_ctrl_reg. There is no functional change. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Reorganizing xilly_setupchannels()Eli Billauer2014-07-091-207/+138
| | | | | | | | | | Duplicate code in this function was moved into a new function, xilly_get_dma_buffers(). There is no change in functionality. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Add sanity check in interrupt handlerEli Billauer2014-07-091-0/+6
| | | | | | | | | Data arriving from the hardware is verified prior to its use. The lack of this check has never been reported to cause a problem, but it's necessary nevertheless. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use devm_ API for memory allocation and DMA mappingEli Billauer2014-06-264-238/+132
| | | | | | | | | | | | | | Managed device resource API replaces code that reinvents it for memory allocation, page allocation and DMA mapping. devm_add_action() is used for unwinding DMA mappings, since there is no devm_* API for dma_map_single(). A recent patch that introduces such API was rejected, mainly on the grounds that it may cause an unnecessary waste of resources. Suggested-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use devm_ API on probe and removeEli Billauer2014-05-244-88/+27
| | | | | | Suggested-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: XILLYBUS_PCIE depends on PCI_MSIEli Billauer2014-03-211-1/+1
| | | | | | | | | | xillybus_pcie.c will compile and load properly on PCI only, but will do nothing useful without PCI_MSI. PCI_MSI depends on PCI, so depending on PCI_MSI covers both. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Added "select CRC32" for XILLYBUS in KconfigEli Billauer2014-03-211-0/+1
| | | | | | | | Reason: xillybus_core.c uses crc32_le() Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/xillybus: Handle OOM in xillybus_init()Richard Weinberger2014-03-181-1/+5
| | | | | | | | | alloc_workqueue() can fail and returns NULL in case of OOM. Handle this case and undo class_create(). Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Open Firmware driver supporting coherent DMAEli Billauer2014-01-091-1/+20
| | | | | | | | | If the "dma-coherent" property is present in the device tree, the driver will not perform cache invalidations. This feature significantly improves data throughput and reduces CPU load. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Changed Open Firmware "compatible" propertyEli Billauer2014-01-091-1/+2
| | | | | | | | The previous "compatible" string was poorly chosen, but remains in the match list to support existing DTBs. There is no risk for a naming clash. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Return -EIO if *_iomap fails, instead of 0Eli Billauer2013-12-171-1/+1
| | | | | | | | | | | | | | This patch replicates the correction made by Wei Yongjun on a second occurrence of the same bug. The first correction was in commit 8eec4555511bfa1f8a2e0a2de45c988fd30c3efb. Bug fixed: The error code was not set, so the error condition wasn't reflected in the return value. Reported-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: fix error return code in xilly_probe()Wei Yongjun2013-12-171-1/+1
| | | | | | | | | Fix to return negative error code -EIO from the error handling case instead of 0. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Removed force to be a moduleEli Billauer2013-12-101-1/+1
| | | | | | | | | | | The driver was forced to "module only" following a previous failure to build into the kernel. The problem was resolved several months ago. This has been successfully tested with "make allyesconfig" on x86_64. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han2013-12-021-1/+1
| | | | | | | | Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use dev_* functions instead of pr_* in xillybus_coreEli Billauer2013-10-191-46/+69
| | | | | | Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use dev_* functions instead of pr_* in xillybus_ofEli Billauer2013-10-191-6/+8
| | | | | | Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use dev_* functions instead of pr_* in xillybus_pcieEli Billauer2013-10-191-13/+12
| | | | | | Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Remember device pointer for use with dev_* functionsEli Billauer2013-10-191-1/+1
| | | | | | | | This is necessary so that xillybus_core uses the correct device pointer for PCIe devices in diagnostic message calls (dev_err, dev_warn and dev_info) Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: Use module_platform_driverSachin Kamat2013-10-111-12/+1
| | | | | | | module_platform_driver simplifies the code by removing the boilerplate. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: xillybus: quoted strings split across linesEbru Akagunduz2013-10-061-59/+25
| | | | | | | | Fix checkpatch.pl issues with quoted strings split across lines in xillybus_core.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: remove redundant Kconfig dependencyBaruch Siach2013-10-051-2/+2
| | | | | | | | | XILLYBUS_PCIE and XILLYBUS_OF are inside 'if XILLYBUS' already, so there is not need to depend on XILLYBUS. Cc: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xillybus: fix format string usageKees Cook2013-09-171-1/+1
| | | | | | | Makes sure format string cannot leak into device_create() call. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud