linux/drivers/bus
Thomas Petazzoni a0b5cd4ac2 bus: mvebu-mbus: use automatic I/O synchronization barriers
Instead of using explicit I/O synchronization barriers shoehorned
inside the streaming DMA mappings API (in
arch/arm/mach-mvebu/coherency.c), we are switching to use automatic
I/O synchronization barrier.

The primary motivation for this change is that explicit I/O
synchronization barriers are not only needed for streaming DMA
mappings (which can easily be done by overriding the dma_map_ops), but
also for coherent DMA mappings (which is a lot less easy to do, since
the kernel assumes such mappings are coherent and don't require any
sort of cache maintenance operation to ensure the consistency of the
buffers).

Switching to automatic I/O synchronization barriers will also allow us
to use the existing arm_coherent_dma_ops instead of our custom
arm_dma_ops.

In order to use automatic I/O synchronization barriers, this commit
changes mvebu-mbus in two ways:

 - It enables automatic I/O synchronization barriers in the 0x84
   register of the MBus bridge, by enabling such barriers for all MBus
   units. This enables automatic barriers for the on-SoC peripherals
   that are doing DMA.

 - It enables the SyncEnable bit in the MBus windows, so that PCIe
   devices also use automatic I/O synchronization barrier.

This automatic synchronization barrier relies on the assumption that
at least one register of a given hardware unit is read before the
driver accesses the DMA mappings modified by this unit. This
assumption is guaranteed for PCI devices by vertue of the PCI
standard, and we can reasonably verify that this assumption is also
true for the limited number of platform drivers doing DMA used on
Marvell EBU platforms.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
2015-01-19 16:05:42 -06:00
..
Kconfig bus: brcmstb_gisb: Make the driver buildable on MIPS 2014-11-28 15:44:42 -08:00
Makefile bus: ARM CCN PMU driver 2014-07-23 22:14:43 +02:00
arm-cci.c bus: cci: move away from arm_pmu framework 2014-10-30 12:16:57 +00:00
arm-ccn.c ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
brcmstb_gisb.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
imx-weim.c bus: drop owner assignment from platform_drivers 2014-10-20 16:20:19 +02:00
mvebu-mbus.c bus: mvebu-mbus: use automatic I/O synchronization barriers 2015-01-19 16:05:42 -06:00
omap-ocp2scp.c bus: drop owner assignment from platform_drivers 2014-10-20 16:20:19 +02:00
omap_l3_noc.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
omap_l3_noc.h bus: omap_l3_noc: Fix connID for OMAP4 2014-09-11 10:43:39 -07:00
omap_l3_smx.c ARM: OMAP3: Fix errors for omap_l3_smx when booted with device tree 2014-11-05 09:23:14 -08:00
omap_l3_smx.h drivers: bus: Move the OMAP interconnect driver to drivers/bus/ 2012-09-19 16:53:26 +02:00
vexpress-config.c ARM: vexpress: refine dependencies for new code 2014-05-26 21:26:52 +02:00