aboutsummaryrefslogtreecommitdiff
path: root/drivers/vme/bridges
AgeCommit message (Collapse)AuthorFilesLines
2022-06-10vme: move back to stagingArnd Bergmann5-5393/+0
The VME subsystem graduated from staging into a top-level subsystem in 2012, with commit db3b9e990e75 ("Staging: VME: move VME drivers out of staging") stating: The VME device drivers have not moved out yet due to some API questions they are still working through, that should happen soon, hopefully. However, this never happened: maintenance of drivers/vme effectively stopped in 2017, with all subsequent changes being treewide cleanups. No hardware driver remains in staging, only the limited user-level access, and I just removed one of the two bridge drivers and the only remaining board. drivers/staging/vme/devices/ was recently moved to drivers/staging/vme_user/, but as the vme_user driver is the only one remaining for this subsystem, it is easier to just move the remaining three source files into this directory rather than keeping the original hierarchy. Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-06-10vme: remove ca91cx42 Universe-II supportArnd Bergmann4-2515/+0
This is one of four remaining drivers using the ancient virt_to_bus() interface instead of the dma-mapping interface, making it incompatible with most modern machines. As nobody has cleaned this up, there is a high chance that this driver has no actual users. The chip was introduced in 1997 and only supports 32-bit legacy PCI. It was replaced by TSI148 in 2004, but that chip has since been discontinued, while a version of the older Universe II remains in production after 25 years. The vme_vmivme7805 board uses Universe-II, so this also gets removed in the process, but PCI add-on cards based on TSI148 can still work in theory. If there are users of the Universe-II driver after all, it is of course possible to revert this patch and fix it to use the dma-mapping interface like the tsi148 driver does. Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-12-09vme: switch from 'pci_' to 'dma_' APIChristophe JAILLET2-12/+14
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'ca91cx42_alloc_consistent()' and 'tsi148_alloc_consistent()' GFP_KERNEL can be used because both functions are called only from 'vme_alloc_consistent()' (vme.c). This function is only called from the 'vme_user_probe()' probe function and no lock is taken in the between. When memory is allocated in 'ca91cx42_crcsr_init()' and 'tsi148_crcsr_init()' GFP_KERNEL can be used because both functions are called only from their corresponding probe function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-11-09vme: remove unneeded breakTom Rix1-7/+0
A break is not needed if it is preceded by a return or goto Signed-off-by: Tom Rix <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-01-29Merge tag 'char-misc-5.6-rc1' of ↵Linus Torvalds1-12/+18
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big char/misc/whatever driver changes for 5.6-rc1 Included in here are loads of things from a variety of different driver subsystems: - soundwire updates - binder updates - nvmem updates - firmware drivers updates - extcon driver updates - various misc driver updates - fpga driver updates - interconnect subsystem and driver updates - bus driver updates - uio driver updates - mei driver updates - w1 driver cleanups - various other small driver updates All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (86 commits) mei: me: add jasper point DID char: hpet: Use flexible-array member binder: fix log spam for existing debugfs file creation. mei: me: add comet point (lake) H device ids nvmem: add QTI SDAM driver dt-bindings: nvmem: add binding for QTI SPMI SDAM dt-bindings: imx-ocotp: Add i.MX8MP compatible dt-bindings: soundwire: fix example soundwire: cadence: fix kernel-doc parameter descriptions soundwire: intel: report slave_ids for each link to SOF driver siox: Use the correct style for SPDX License Identifier w1: omap-hdq: Simplify driver with PM runtime autosuspend firmware: stratix10-svc: Remove unneeded semicolon firmware: google: Probe for a GSMI handler in firmware firmware: google: Unregister driver_info on failure and exit in gsmi firmware: google: Release devices before unregistering the bus slimbus: qcom: add missed clk_disable_unprepare in remove slimbus: Use the correct style for SPDX License Identifier slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel() dt-bindings: SLIMBus: add slim devices optional properties ...
2020-01-14vme: bridges: reduce stack usageArnd Bergmann1-12/+18
With CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, the stack usage in vme_fake grows above the warning limit: drivers/vme/bridges/vme_fake.c: In function 'fake_master_read': drivers/vme/bridges/vme_fake.c:610:1: error: the frame size of 1160 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] drivers/vme/bridges/vme_fake.c: In function 'fake_master_write': drivers/vme/bridges/vme_fake.c:797:1: error: the frame size of 1160 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] The problem is that in some configurations, each call to fake_vmereadX() puts another variable on the stack. Reduce the amount of inlining to get back to the previous state, with no function using more than 200 bytes each. Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-01-06remove ioremap_nocache and devm_ioremap_nocacheChristoph Hellwig2-4/+4
ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner5-25/+5
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2-0/+2
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-07-16vme: ca91cx42: remove redundant variable iColin Ian King1-2/+0
Variable i is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'i' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-10-13vme: tsi148: Adjust 14 checks for null pointersMarkus Elfring1-14/+14
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: tsi148: Improve 17 size determinationsMarkus Elfring1-19/+18
Replace the specification of data structures by variable references as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <[email protected]> [[email protected]: Correct long line] Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: tsi148: Delete nine error messages for a failed memory allocationMarkus Elfring1-18/+0
Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: ca91cx42: Adjust 14 checks for null pointersMarkus Elfring1-14/+14
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: ca91cx42: Improve 12 size determinationsMarkus Elfring1-17/+12
Replace the specification of data structures by variable references as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: ca91cx42: Delete eight error messages for a failed memory allocationMarkus Elfring1-16/+0
Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: fake: Adjust 11 checks for null pointersMarkus Elfring1-11/+11
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: fake: Improve five size determinations in fake_init()Markus Elfring1-7/+5
Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-10-13vme: fake: Delete an error message for a failed memory allocation in fake_init()Markus Elfring1-1/+0
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Martyn Welch <[email protected]>
2017-01-11vme: Fix wrong pointer utilization in ca91cx42_slave_getAugusto Mecking Caringi1-1/+1
In ca91cx42_slave_get function, the value pointed by vme_base pointer is set through: *vme_base = ioread32(bridge->base + CA91CX42_VSI_BS[i]); So it must be dereferenced to be used in calculation of pci_base: *pci_base = (dma_addr_t)*vme_base + pci_offset; This bug was caught thanks to the following gcc warning: drivers/vme/bridges/vme_ca91cx42.c: In function ‘ca91cx42_slave_get’: drivers/vme/bridges/vme_ca91cx42.c:467:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] *pci_base = (dma_addr_t)vme_base + pci_offset; Signed-off-by: Augusto Mecking Caringi <[email protected]> Acked-By: Martyn Welch <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27vme: fake: remove unexpected unlock in fake_master_set()Wei Yongjun1-3/+0
image->lock is unlocked in some error handling path without take the lock, so remove those unexpected unlock. Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver") Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27vme: fake: mark symbols static where possibleBaoyou Xie1-8/+8
We get 4 warnings when building kernel with W=1: drivers/vme/bridges/vme_fake.c:384:6: warning: no previous prototype for 'fake_lm_check' [-Wmissing-prototypes] drivers/vme/bridges/vme_fake.c:619:6: warning: no previous prototype for 'fake_vmewrite8' [-Wmissing-prototypes] drivers/vme/bridges/vme_fake.c:649:6: warning: no previous prototype for 'fake_vmewrite16' [-Wmissing-prototypes] drivers/vme/bridges/vme_fake.c:679:6: warning: no previous prototype for 'fake_vmewrite32' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-13vme: fake: fix build for 64-bit dma_addr_tArnd Bergmann1-8/+18
casting between dma_addr_t and a pointer is generally tricky, as they might not be the same size and almost never point into the same address space. With 32-bit ARM systems and LPAE, we get this warning for the vme_fake driver that stores a pointer in a dma_addr_t variable: drivers/vme/bridges/vme_fake.c: In function 'fake_slave_set': drivers/vme/bridges/vme_fake.c:204:29: error: assignment makes pointer from integer without a cast [-Werror=int-conversion] To make this clearer while fixing the warning, I'm adding a set of helper functions for the type conversion. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-31vme: Adding Fake VME driverMartyn Welch3-0/+1308
This patch introduces a fake VME bridge driver. This driver currently emulates a subset of the VME bridge functionality. This allows some VME subsystem development and even some VME device driver development to be carried out in the absence of a proper VME bus. Signed-off-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-31vme: Fix module autoloadAlessio Igor Bogani2-0/+4
These drivers have a PCI device ID table but the PCI module alias information is not created so module autoloading won't work. Signed-off-by: Alessio Igor Bogani <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-31vme: change LM callback argument to void pointerAaron Sierra4-6/+12
Make the location monitor callback function prototype more useful by changing the argument from an integer to a void pointer. All VME bridge drivers were simply passing the location monitor index (e.g. 0-3) as the argument to these callbacks. It is much more useful to pass back a pointer to data that the callback-registering driver cares about. There appear to be no in-kernel callers of vme_lm_attach (or vme_lme_request for that matter), so this change only affects the VME subsystem and bridge drivers. This has been tested with Tsi148 hardware, but the CA91Cx42 changes have only been compiled. Signed-off-by: Aaron Sierra <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-05-01vme: add vme_init_bridge for common bridge initAaron Sierra2-16/+2
Consolidate vme_bridge structure setup that every bridge was required to do itself. This came about because .irq_mtx is only used within the VME core, but was required to be setup externally. This returns the structure passed in to support shorthand like this: bridge = vme_init_bridge(&priv->bridge); Signed-off-by: Aaron Sierra <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-07vme: vme_ca91cx42.c: use to_pci_dev()Geliang Tang1-6/+5
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-05vme: tsi148: silence uninitialized variable warningDmitry Kalinkin1-2/+2
The warning is a false positive. drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_write': drivers/vme/bridges/vme_tsi148.c:1358:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized] vme_unregister_error_handler(handler); ^ drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_read': drivers/vme/bridges/vme_tsi148.c:1260:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized] vme_unregister_error_handler(handler); ^ Fixes: 0b0496625715 ("vme: change bus error handling scheme") Signed-off-by: Dmitry Kalinkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04vme: change bus error handling schemeDmitry Kalinkin2-43/+43
The current VME bus error handler adds errors to the bridge error list. vme_master_{read,write} then traverses that list to look for relevant errors. Such scheme didn't work well for accesses going through vme_master_mmap because they would also allocate a vme_bus_error, but have no way to do vme_clear_errors call to free that memory. This changes the error handling process to be other way around: now vme_master_{read,write} defines a window in VME address space that will catch possible errors. VME bus error interrupt only traverses these windows and marks those that had errors in them. Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04vme: include address space in error filteringDmitry Kalinkin1-1/+3
Also changes vme_bus_error_handler to take generic address modifier code instead of raw contents of a device-specific attribute register. Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04vme: move tsi148 error handling into VME subsystemDmitry Kalinkin1-86/+7
Error handling code found in tsi148 is not device specific. In fact it already relies on shared vme_bus_error struct and vme_bridge.vme_errors field. The other bridge driver could reuse this code if it is shared. This introduces a slight behavior change: vme error message won't be triggered in a rare case when err_chk=1 and kmalloc fails. Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Acked-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-04vme: lower alignment requirement in pci bridge driversDmitry Kalinkin2-2/+2
Universe II allows PCI address grannularity of 4K or 64K depending on the window id. tsi148 only supports 64K. Existing driver implementations are validating window size against this grannularity and then use that very size as alignment parameter to pci_bus_alloc_resource. This constraint is excessive, alignment by granularity should be enough. This changes alignment constraint from size to a fixed constraint of 64K. Signed-off-by: Dmitry Kalinkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-12vme: tsi148: depend on HAS_DMA for KconfigDmitry Kalinkin1-1/+1
Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-12vme: ca91cx42: fix LM_CTL address maskDmitry Kalinkin1-1/+1
Universe II datasheet defines following address space values for LM_CTL[16:18] 000=A16 001=A24 010=A32 011,100,101=Reserved 110=User1 111=User2 Mask 5<<16 is not the right one for matching [16:18], instead we should use 7<<16. Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-12vme: ca91cx42: return error code on DMA errorDmitry Kalinkin1-0/+1
Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-12vme: stop DMA transfer on interruptionDmitry Kalinkin2-5/+27
Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-12vme: tsi148: fix first DMA item mappingDmitry Kalinkin1-11/+12
This moves DMA mapping of the first list element to vme_list_add, the same place where other elements mappings occur. This prevents extra mapping or over-unmapping in the cases when vme_list_exec is called more or less than one time respectively. Also adds dma_mapping_error check. Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-12vme: tsi148: fix DMA lists longer that one itemDmitry Kalinkin1-2/+2
DMA lists on tsi148 weren't processed further than the first item because of the broken logic. This regression was introduced in: ac1a4f2caf7b071 "Staging: VME: Ensure TSI148 link list descriptors..." Signed-off-by: Dmitry Kalinkin <[email protected]> Cc: Igor Alekseev <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-06vme: tsi148: Master windows support USERx and CR/CSR accesses, not slavesMartyn Welch1-8/+3
The tsi148 driver is registering the slave images as supporting the "USER" access modes and CR/CSR access mode rather than the master images as it should. Remove the incorrect case entries for these modes from the tsi148_slave_set() function, stop registering slave_images as supporting these modes and instead register master windows as supporting these modes. Signed-off-by: Martyn Welch <[email protected]> Acked-by: Dmitry Kalinkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-08vme: bridges: use pci_zalloc_consistentJoe Perches2-8/+4
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <[email protected]> Cc: Martyn Welch <[email protected]> Cc: Manohar Vanga <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-07-09VME: remove duplicate CA91CX42_DCTL_VDW_M defineDan Carpenter1-1/+0
The CA91CX42_DCTL_VDW_M define is cut and pasted twice so we can delete the second instance. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16vme_tsi148: Utilize to_pci_dev() macroAaron Sierra1-8/+6
Save some characters by using to_pci_dev() instead of container_of(). Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16vme_tsi148: Fix PCI address mapping assumptionJoe Schultz1-1/+7
Previously, tsi148_master_set() assumed the address contained in its PCI bus resource represented the actual PCI bus address. This is a fine assumption on some platforms. However, on platforms that don't use a 1:1 (CPU:PCI) mapping this results in the tsi148 driver configuring an invalid master window translation. This patch updates the vme_tsi148 driver to first convert the address contained in the PCI bus resource into a PCI bus address before using it. [asierra: account for pcibios_resource_to_bus() prototype change] Signed-off-by: Joe Schultz <[email protected]> Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16vme_tsi148: Fix typo in tsi148_slave_get()Joe Schultz1-1/+1
This patch corrects a typo where "vme_base" was used instead of "*vme_base". The typo resulted in an incorrect value being returned to userspace (via vme_user). It also removes the following compile warning on some platforms: warning: cast from pointer to integer of different size [asierra: commit title/log rewording] Signed-off-by: Joe Schultz <[email protected]> Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18Merge 3.14-rc3 into char-misc-nextGreg Kroah-Hartman2-4/+4
We need the fixes here for future mei and other patches. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-15VME: Stop using memcpy_[to|from]io() due to unwanted behaviourMartyn Welch2-24/+23
The ca91cx42 and tsi148 VME bridges use the width of reads and writes on the PCI bus in part to control the width of the cycles on the VME bus. It is important that we can control the width of cycles on the VME bus as some VME hardware requires cycles of a specific width. The memcpy_toio() and memcpy_fromio() functions do not provide sufficient control, so instead loop using ioread functions. Reported-by: Michael Kenney <[email protected]> Signed-off-by: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-07VME: Correct read/write alignment algorithmMartyn Welch2-4/+4
In order to ensure the correct width cycles on the VME bus, the VME bridge drivers implement an algorithm to utilise the largest possible width reads and writes whilst maintaining natural alignment constraints. The algorithm currently looks at the start address rather than the current read/write address when determining whether a 16-bit width cycle is required to get to 32-bit alignment. This results in incorrect alignment, Reported-by: Jim Strouth <[email protected]> Tested-by: Jim Strouth <[email protected]> Signed-off-by: Martyn Welch <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-03vme: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han2-2/+2
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-08-27vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq()Wei Yongjun1-1/+5
free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>