02 May, 2016
2 commits
-
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
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Fix a typo in the spurious interrupt warning and consistently capitalize
VME, PCI, and DMA acronyms.Signed-off-by: Aaron Sierra
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
08 Feb, 2016
1 commit
-
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
05 Nov, 2015
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc driver update for 4.4-rc1. Lots of
different driver and subsystem updates, hwtracing being the largest
with the addition of some new platforms that are now supported. Full
details in the shortlog.All of these have been in linux-next for a long time with no reported
issues"* tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (181 commits)
fpga: socfpga: Fix check of return value of devm_request_irq
lkdtm: fix ACCESS_USERSPACE test
mcb: Destroy IDA on module unload
mcb: Do not return zero on error path in mcb_pci_probe()
mei: bus: set the device name before running fixup
mei: bus: use correct lock ordering
mei: Fix debugfs filename in error output
char: ipmi: ipmi_ssif: Replace timeval with timespec64
fpga: zynq-fpga: Fix issue with drvdata being overwritten.
fpga manager: remove unnecessary null pointer checks
fpga manager: ensure lifetime with of_fpga_mgr_get
fpga: zynq-fpga: Change fw format to handle bin instead of bit.
fpga: zynq-fpga: Fix unbalanced clock handling
misc: sram: partition base address belongs to __iomem space
coresight: etm3x: adding documentation for sysFS's cpu interface
vme: 8-bit status/id takes 256 values, not 255
fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000
ARM: zynq: dt: Updated devicetree for Zynq 7000 platform.
ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager.
ver_linux: proc/modules, limit text processing to 'sed'
...
18 Oct, 2015
1 commit
-
Fixes an off by one array size.
Signed-off-by: Dmitry Kalinkin
Signed-off-by: Greg Kroah-Hartman
05 Oct, 2015
6 commits
-
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
Signed-off-by: Greg Kroah-Hartman -
This will enable error messages for accesses done through mmap.
Signed-off-by: Dmitry Kalinkin
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Igor Alekseev
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Igor Alekseev
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman
13 Jun, 2015
8 commits
-
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
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=User2Mask 5<<
Cc: Igor Alekseev
Reported-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Dmitry Kalinkin
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman
07 Mar, 2015
2 commits
-
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
Acked-by: Dmitry Kalinkin
Signed-off-by: Greg Kroah-Hartman -
We also make sure that user won't be able to reconfigure the window while it is
mmap'ed.Signed-off-by: Dmitry Kalinkin
Cc: Martyn Welch
Cc: Igor Alekseev
Signed-off-by: Greg Kroah-Hartman
12 Jan, 2015
1 commit
-
Replace a misspelled function name by %s and then __func__.
This is the get function, not the set function, as was indicated by the
string.This was done using Coccinelle, including the use of Levenshtein distance,
as proposed by Rasmus Villemoes.Signed-off-by: Julia Lawall
Signed-off-by: Greg Kroah-Hartman
09 Aug, 2014
1 commit
-
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches
Cc: Martyn Welch
Cc: Manohar Vanga
Acked-by: Greg Kroah-Hartman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Jul, 2014
1 commit
-
The CA91CX42_DCTL_VDW_M define is cut and pasted twice so we can delete
the second instance.Signed-off-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman
17 Apr, 2014
3 commits
-
Save some characters by using to_pci_dev() instead of container_of().
Signed-off-by: Aaron Sierra
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Aaron Sierra
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Aaron Sierra
Signed-off-by: Greg Kroah-Hartman
19 Feb, 2014
1 commit
-
We need the fixes here for future mei and other patches.
Signed-off-by: Greg Kroah-Hartman
16 Feb, 2014
1 commit
-
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
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
08 Feb, 2014
1 commit
-
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
Tested-by: Jim Strouth
Signed-off-by: Martyn Welch
Cc: stable
Signed-off-by: Greg Kroah-Hartman
18 Dec, 2013
1 commit
-
Previously, VME bridge support was treated as any other driver (using
module_init() macro), but if VME bridge and vme_user (staging) drivers
were compiled into the kernel, then vme_user would attempt to register
itself before the VME core support had been loaded. This would result
in a kernel panic.The load order of these built-in drivers is based on the order in which
drivers/staging/vme and driver/vme are compiled.This patch changes the VME core driver to use the subsys_initcall()
macro which ensures that it is loaded before all other VME drivers
regardless of the order in which they are compiled.Tested-by: Aaron Sierra
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
04 Dec, 2013
3 commits
-
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.Signed-off-by: Jingoo Han
Signed-off-by: Greg Kroah-Hartman -
Traditionally the "get" functions increment the reference count of the
object that is returned, which does not happen with vme_slot_get. The
function vme_slot_get returns the physical VME slot associated with a
particular struct vme_dev. Rename vme_slot_num to avoid any confusion.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
The match function for vme_user is completely wrong. It will blindly bind
against the first VME slot on each bus (at this point that would be just the
first bus as the driver can only handle one bus).The original intention (before some major subsystem changes) was that the
driver bind against the slot to which the bridge was attached in the VME
system and to the bus(es) provided via the "bus" module parameter.To do this cleanly (i.e. without poking arround in the subsystems internal
stuctures) a functionality has been added to provide access to the bus
enumeration.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
28 Aug, 2013
1 commit
-
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
Signed-off-by: Greg Kroah-Hartman
20 Aug, 2013
3 commits
-
Added missing __iomem annotation in order to fix the following
sparse warnings:drivers/vme/boards/vme_vmivme7805.c:62:19: warning: incorrect type in assignment (different address spaces)
drivers/vme/boards/vme_vmivme7805.c:62:19: expected void *static [toplevel] vmic_base
drivers/vme/boards/vme_vmivme7805.c:62:19: got void [noderef] *
drivers/vme/boards/vme_vmivme7805.c:70:9: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/boards/vme_vmivme7805.c:70:9: expected void volatile [noderef] *addr
drivers/vme/boards/vme_vmivme7805.c:70:9: got void *
drivers/vme/boards/vme_vmivme7805.c:73:16: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/boards/vme_vmivme7805.c:73:16: expected void const volatile [noderef] *addr
drivers/vme/boards/vme_vmivme7805.c:73:16: got void *
drivers/vme/boards/vme_vmivme7805.c:75:9: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/boards/vme_vmivme7805.c:75:9: expected void volatile [noderef] *addr
drivers/vme/boards/vme_vmivme7805.c:75:9: got void *
drivers/vme/boards/vme_vmivme7805.c:78:16: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/boards/vme_vmivme7805.c:78:16: expected void const volatile [noderef] *addr
drivers/vme/boards/vme_vmivme7805.c:78:16: got void *
drivers/vme/boards/vme_vmivme7805.c:85:9: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/boards/vme_vmivme7805.c:85:9: expected void volatile [noderef] *addr
drivers/vme/boards/vme_vmivme7805.c:85:9: got void *
drivers/vme/boards/vme_vmivme7805.c:99:17: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/boards/vme_vmivme7805.c:99:17: expected void volatile [noderef] *addr
drivers/vme/boards/vme_vmivme7805.c:99:17: got void *static [toplevel] vmic_baseSigned-off-by: Jingoo Han
Signed-off-by: Greg Kroah-Hartman -
Added missing __iomem annotation in order to fix the following
sparse warnings:drivers/vme/bridges/vme_ca91cx42.c:859:39: warning: incorrect type in initializer (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:859:39: expected void *addr
drivers/vme/bridges/vme_ca91cx42.c:859:39: got void [noderef] *
drivers/vme/bridges/vme_ca91cx42.c:878:30: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:878:30: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:878:30: got void *addr
drivers/vme/bridges/vme_ca91cx42.c:885:47: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:885:47: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:885:47: got void *
drivers/vme/bridges/vme_ca91cx42.c:889:48: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:889:48: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:889:48: got void *
drivers/vme/bridges/vme_ca91cx42.c:896:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:896:17: expected void const volatile [noderef] *
drivers/vme/bridges/vme_ca91cx42.c:896:17: got void *
drivers/vme/bridges/vme_ca91cx42.c:901:40: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:901:40: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:901:40: got void *
drivers/vme/bridges/vme_ca91cx42.c:905:39: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:905:39: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:905:39: got void *
drivers/vme/bridges/vme_ca91cx42.c:919:39: warning: incorrect type in initializer (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:919:39: expected void *addr
drivers/vme/bridges/vme_ca91cx42.c:919:39: got void [noderef] *
drivers/vme/bridges/vme_ca91cx42.c:932:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:932:17: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:932:17: got void *addr
drivers/vme/bridges/vme_ca91cx42.c:939:25: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:939:25: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:939:25: got void *
drivers/vme/bridges/vme_ca91cx42.c:943:25: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:943:25: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:943:25: got void *
drivers/vme/bridges/vme_ca91cx42.c:950:17: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:950:17: expected void volatile [noderef] *
drivers/vme/bridges/vme_ca91cx42.c:950:17: got void *
drivers/vme/bridges/vme_ca91cx42.c:955:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:955:17: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:955:17: got void *
drivers/vme/bridges/vme_ca91cx42.c:959:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_ca91cx42.c:959:17: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_ca91cx42.c:959:17: got void *Signed-off-by: Jingoo Han
Signed-off-by: Greg Kroah-Hartman -
Added missing __iomem annotation in order to fix the following
sparse warnings:drivers/vme/bridges/vme_tsi148.c:1270:39: warning: incorrect type in initializer (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1270:39: expected void *addr
drivers/vme/bridges/vme_tsi148.c:1270:39: got void [noderef] *
drivers/vme/bridges/vme_tsi148.c:1287:30: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1287:30: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1287:30: got void *addr
drivers/vme/bridges/vme_tsi148.c:1294:47: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1294:47: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1294:47: got void *
drivers/vme/bridges/vme_tsi148.c:1298:48: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1298:48: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1298:48: got void *
drivers/vme/bridges/vme_tsi148.c:1305:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1305:17: expected void const volatile [noderef] *
drivers/vme/bridges/vme_tsi148.c:1305:17: got void *
drivers/vme/bridges/vme_tsi148.c:1310:40: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1310:40: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1310:40: got void *
drivers/vme/bridges/vme_tsi148.c:1314:39: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1314:39: expected void const volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1314:39: got void *
drivers/vme/bridges/vme_tsi148.c:1351:39: warning: incorrect type in initializer (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1351:39: expected void *addr
drivers/vme/bridges/vme_tsi148.c:1351:39: got void [noderef] *
drivers/vme/bridges/vme_tsi148.c:1369:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1369:17: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1369:17: got void *addr
drivers/vme/bridges/vme_tsi148.c:1376:25: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1376:25: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1376:25: got void *
drivers/vme/bridges/vme_tsi148.c:1380:25: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1380:25: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1380:25: got void *
drivers/vme/bridges/vme_tsi148.c:1387:17: warning: incorrect type in argument 1 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1387:17: expected void volatile [noderef] *
drivers/vme/bridges/vme_tsi148.c:1387:17: got void *
drivers/vme/bridges/vme_tsi148.c:1392:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1392:17: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1392:17: got void *
drivers/vme/bridges/vme_tsi148.c:1396:17: warning: incorrect type in argument 2 (different address spaces)
drivers/vme/bridges/vme_tsi148.c:1396:17: expected void volatile [noderef] *addr
drivers/vme/bridges/vme_tsi148.c:1396:17: got void *Signed-off-by: Jingoo Han
Signed-off-by: Greg Kroah-Hartman
25 Jun, 2013
1 commit
-
Fix to return a negative error code in the tsi148_crcsr_init() error
handling case instead of 0, as done elsewhere in this function.Signed-off-by: Wei Yongjun
Signed-off-by: Greg Kroah-Hartman
18 Jun, 2013
1 commit
-
The tsi148 driver can be configured to reserve a window for internal
use (as part of the error checking routine). The intialisation of this
window currently configures a set of attributes that are never used
as these are only ever used by the VME core and this window is not
advertised to the core.Remove configuration of these attributes.
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman