aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vme (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-11-21staging: vme: remove use of __devexitBill Pemberton2-4/+4
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Martyn Welch <martyn.welch@ge.com> Cc: Manohar Vanga <manohar.vanga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: vme: remove use of __devinitBill Pemberton4-6/+6
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Martyn Welch <martyn.welch@ge.com> Cc: Manohar Vanga <manohar.vanga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: vme: remove use of __devexit_pBill Pemberton2-2/+2
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Martyn Welch <martyn.welch@ge.com> Cc: Manohar Vanga <manohar.vanga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging/vme: Use dev_ or pr_ printks in devices/vme_user.cYAMANE Toshiaki1-39/+34
fixed below checkpatch warnings. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... - WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... - WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... and add pr_fmt. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging/vme: Use pr_ printks in vme_pio2_core.cToshiaki Yamane1-5/+5
The below checkpatch warnings was fixed, -WARNING: Prefer pr_err(... to printk(KERN_ERR, ... and added pr_fmt. Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: vme: Fix a white space issueToshiaki Yamane1-1/+1
The below checkpatch error was fixed. -ERROR: trailing whitespace Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-14staging "vme" Fix typos.Justin P. Mattock1-4/+4
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-19vme_user.c: remove duplicated includeDuan Jiong1-1/+0
Signed-off-by: Duan Jiong <djduanjiong@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06Staging: vme: silence a Sparse warningDan Carpenter1-1/+1
Sparse complains that "arg" is not a __user pointer. The "argp" and "arg" variables are equivalent but argp is declared as a __user pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-By: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02Merge 3.4-rc5 into staging-nextGreg Kroah-Hartman22-9132/+29
This resolves the conflict in: drivers/staging/vt6656/ioctl.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-26Staging: VME: move VME drivers out of stagingGreg Kroah-Hartman22-9131/+6
This moves the VME core, VME board drivers, and VME bridge drivers out of the drivers/staging/vme/ area to drivers/vme/. The VME device drivers have not moved out yet due to some API questions they are still working through, that should happen soon, hopefully. Cc: Martyn Welch <martyn.welch@ge.com> Cc: Manohar Vanga <manohar.vanga@cern.ch> Cc: Vincent Bossier <vincent.bossier@gmail.com> Cc: "Emilio G. Cota" <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging: vme: vme.c: fix minor coding style issuesGreg Kroah-Hartman1-24/+15
Fix up some broken printk strings that were spanning multiple lines, making it hard to search for them. Cc: Manohar Vanga <manohar.vanga@cern.ch> Cc: Martyn Welch <martyn.welch@ge.com> Cc: "Emilio G. Cota" <cota@braap.org> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18drivers: staging: vme: devices: Remove unneeded include version.hMarcos Paulo de Souza2-2/+0
The output of "make versioncheck" told us that: drivers/staging/vme/devices/vme_pio2_core.c: 13 linux/version.h not needed. drivers/staging/vme/devices/vme_pio2_gpio.c: 13 linux/version.h not needed. If we take a look at these files, we will agree to remove it. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: <devel@driverdev.osuosl.org> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10Staging: VME: Ensure TSI148 link list descriptors are written big endianMartyn Welch2-80/+103
The DMA functionality fails to work on little endian processors, such as found on x86 based platforms. The DMA engine copies the link list descriptors from memory into big endian registers. On little endian systems this results in the values being byte swapped. This patch uses standard kernel functionality to ensure that the descriptors are stored in big endian format. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10Staging: VME: Convert TSI148 to use dma_map_singleMartyn Welch2-7/+16
The DMA functionality fails to work on some Intel based platforms. Some recent Intel platforms have an IOMMU. Transferring the DMA descriptors, which were mapped using virt_to_phys(), failed. This patch updates the driver to use dma_map_single(). Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: Fix typo in multiple filesMasanari Iida1-1/+1
Collect spelling typo in multiple files within staging directory. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10Staging: vme: Replace semaphore by mutex.Santosh Nayak1-21/+22
Replace binary semaphore by mutex for code cleanup. Mutex also gives better performance than semaphore. Add 'mutex_destroy()' in 'vme_user_remove()' routine. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging/vme: Fix module parametersGerard Snitselaar1-2/+2
loopback should be declared bool, and variant probably shouldn't be const. Signed-off-by: Gerard Snitselaar <dev@snitselaar.org> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15staging: vme: fix section mismatches in linux-next 20120314Gerard Snitselaar2-4/+4
pio2_gpio_init() annotated with __init, but called by pio2_probe() which is annotated __devinit. pio2_gpio_exit() is annotated __exit, but is called by pio2_probe() and by pio2_remove() which is annotated __devexit. Signed-off-by: Gerard Snitselaar <dev@snitselaar.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: vme: code convention fixSam Hansen1-1/+1
Fixed a code convention violation in vme.h Signed-off-by: Sam Hansen <solid.se7en@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell1-1/+1
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-12-12Staging: VME: PIO2: Add GPIOLIB dependancyMartyn Welch1-0/+1
The PIO2 driver errors when GPIOLIB, on which it depends, is not enabled. Add dependancy when selecting the PIO2. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Martyn Welch <martyn.welch@ge.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-01Staging: VME: Remove typedefsMartyn Welch7-130/+107
The use of typedefs is discouraged, remove them. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30Staging: VME: PIO2: Correct irq resetMartyn Welch1-2/+7
The loop used to reset the interrupt masks has faulty logic. There are 4 banks of 8 I/O, however each mask is comprised of 2 bits and thus there are 8 sets of registers to clear. Driver was wrongly equating this with 8 banks leading to a us writing past the end of the "bank" array (used to store mask configuration as these registers are write only) and thus causing memory corruption. Clear both registers of masks for each bank and half iterations. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26Driver for GE PIO2 VME CardMartyn Welch6-0/+1086
This patch implements a driver for the GE PIO2 VME Parallel I/O Card. This card is a 6U VME Card, implementing 32 solid-state relay switched IO lines, in 4 groups of 8. Each bank of IO lines is built to function as input, output or both depending on the variant of the card. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26staging: vme: fix comment for struct vme_devManohar Vanga1-1/+1
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26staging: vme: remove vme_add_bus() and vme_remove_bus()Manohar Vanga1-18/+8
The functions vme_add_bus() and vme_remove_bus() were only being used in the vme_register_bridge() and vme_unregister_bridge() functions respectively. This patch gets rid of them and moves their code to vme_register_bridge() and vme_unregister_bridge(). Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26staging: vme: fix comment in __vme_register_driver()Manohar Vanga1-4/+1
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26Staging: VME: Update TODO fileMartyn Welch1-66/+1
Contents of TODO file has become more of a feature wish-list rather than issues which should stop the VME driver being merged into the mainline kernel. Update the TODO list with issues that need to be resolved before it can be migrated to mainline. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26staging: vme: fix address cast warnings for 64 bit architecturesManohar Vanga1-6/+7
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17staging: vme_user: rename USER_BUS_MAX to VME_USER_BUS_MAXManohar Vanga2-6/+6
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Cc: Martyn Welch <martyn.welch@ge.com> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17staging: vme: get rid of struct vme_device_id and slotsManohar Vanga4-35/+16
Previously, the device-driver matching mechanism depended on the vme_device_id structure due to the need for a bind table per driver. This method of matching is no longer used so this patch merges the fields of struct vme_device_id into struct vme_dev. Since this also renders the slot field meaningless, it has also been removed in this patch. Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Cc: Martyn Welch <martyn.welch@ge.com> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17staging: vme: make match() driver specific to improve non-VME64x supportManohar Vanga5-166/+169
For jumper based boards (non VME64x), there is no mechanism for detecting the card that is plugged into a specific slot. This leads to issues in non-autodiscovery crates/cards when a card is plugged into a slot that is "claimed" by a different driver. In reality, there is no problem, but the driver rejects such a configuration due to its dependence on the concept of slots. This patch makes the concept of slots less critical and pushes the driver match() to individual drivers (similar to what happens in the ISA bus in driver/base/isa.c). This allows drivers to register the number of devices that they expect without any restrictions. Devices in this new model are now formatted as $driver_name-$bus_id.$device_id (as compared to the earlier vme-$bus_id.$slot_number). This model also makes the device model more logical as devices are only registered when they actually exist whereas earlier, a set of devices were being created automatically regardless of them actually being there. Another change introduced in this patch is that devices are now created within the VME driver structure rather than in the VME bridge structure. This way, things don't go haywire if the bridge driver is removed while a driver is using it. Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Cc: Martyn Welch <martyn.welch@ge.com> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17staging: vme: add struct vme_dev for VME devicesManohar Vanga5-108/+117
Instead of using a vanilla 'struct device' for VME devices, add new 'struct vme_dev'. Modifications have been made to the VME framework API as well as all in-tree VME drivers. The new vme_dev structure has the following advantages from the current model used by the driver: * Driver functions (probe, remove) now receive a VME device instead of a pointer to the bridge device (cleaner design) * It's easier to differenciate API calls as bridge-based or device-based (ie. cleaner interface). Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Cc: Martyn Welch <martyn.welch@ge.com> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-09staging: vme: change static device array to pointersManohar Vanga2-5/+18
Change the static array of 'struct device''s in struct vme_bridge to instead use an array of pointers. This is in accordance with the requirement that all kobjects be dynamically allocated (see Documentation/kobject.txt) and never be statically allocated. Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging: vme: keep track of registered busesManohar Vanga2-15/+24
This patch adds a list which keeps track of all registered VME buses. This is required for adding refcounting later to bridge modules, something that is not currently implemented. This is based on the changes introduced by Emilio G. Cota in the patch: https://lkml.org/lkml/2010/10/25/486 Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging: vme: make [alloc|free]_consistent bridge specificManohar Vanga4-18/+76
Make PCI dependent functions ([alloc|free]_consistent() in 'vme.c') bridge specific. By removing the dependency of the VME bridge framework on PCI, this patch allows for addition of non-PCI based VME bridges. Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging: vme_user: change kmalloc+memset to kzallocManohar Vanga1-3/+1
Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28Staging: VME: Introduce IOCTL to generate VME interrupts.Vincent Bossier2-0/+22
The vme_irq_set is oblviously not needed (a remnant from old tests) and the IOCTL exchange types have been updated following Greg's comments. Allow the IOCTL call to generate VME interrupts when called on the vme/ctl device with the right arguments. Signed-off-by: Vincent Bossier <vincent.bossier@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28Staging: VME: Fix ca91cx42 VME interrupt generation.Vincent Bossier1-1/+14
The wait_event_interruptible call requires a condition as second argument that needs to be true sometimes, which is obviously not the case with '0'. The new logic is inspired from the tsi148 driver and takes into account Universe II chip specifics. Signed-off-by: Vincent Bossier <vincent.bossier@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28Staging: VME: Make vme/ctl device available for IOCTL operations only.Vincent Bossier1-2/+11
Resurrect the vme/ctl device by allowing to open it even if it has no resources and make related read/write/llseek operations dummy. Signed-off-by: Vincent Bossier <vincent.bossier@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28Staging: VME: Fix Universe II int ack logic.Vincent Bossier1-1/+1
The driver must acknowledge the interrupts that have been actually serviced, not the ones active. The current code could acknowledge an interrupt that has not been serviced at all. Signed-off-by: Vincent Bossier <vincent.bossier@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28Staging VME: Fix remaining checkpatch.pl errors.Vincent Bossier5-17/+17
This patch solves all the existing issues reported by checkpatch.pl in the VME sub-system. Signed-off-by: Vincent Bossier <vincent.bossier@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi4-12/+12
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-14staging: vme: Remove NULL check before kfreeIlia Mirkin2-4/+2
This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging: vme: remove unreachable codeManohar Vanga2-5/+0
Remove some more unreachable code found in bridges/vme_ca91cx42.c and bridges/vme_tsi148.c Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28staging: vme: remove unreachable codeManohar Vanga1-4/+0
Remove some unreachable code (kfree calls) from vme.c Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23staging: vme: fix loop conditionManohar Vanga1-1/+1
Fix loop condition in vme_register_bridge that results in an infinite loop in the event that device_register fails. Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23staging: vme: remove unreachable codeManohar Vanga1-1/+0
Removed some unreachable code from vme_register_bridge Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-28Delete zero-length drivers/staging/vme/bridges/Module.symversJeff Garzik1-0/+0
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>