android_kernel_motorola_sm6225/drivers/bus
Thomas Petazzoni bfa1ce5f38 bus: mvebu-mbus: add mv_mbus_dram_info_nooverlap()
This commit introduces a variant of the mv_mbus_dram_info() function
called mv_mbus_dram_info_nooverlap(). Both functions are used by
Marvell drivers supporting devices doing DMA, and provide them a
description the DRAM ranges that they need to configure their DRAM
windows.

The ranges provided by the mv_mbus_dram_info() function may overlap
with the I/O windows if there is a lot (>= 4 GB) of RAM
installed. This is not a problem for most of the DMA masters, except
for the upcoming new CESA crypto driver because it does DMA to the
SRAM, which is mapped through an I/O window. For this unit, we need to
have DRAM ranges that do not overlap with the I/O windows.

A first implementation done in commit 1737cac693 ("bus: mvebu-mbus:
make sure SDRAM CS for DMA don't overlap the MBus bridge window"),
changed the information returned by mv_mbus_dram_info() to match this
requirement. However, it broke the requirement of the other DMA
masters than the DRAM ranges should have power of two sizes.

To solve this situation, this commit introduces a new
mv_mbus_dram_info_nooverlap() function, which returns the same
information as mv_mbus_dram_info(), but guaranteed to not overlap with
the I/O windows.

In the end, it gives us two variants of the mv_mbus_dram_info*()
functions:

 - The normal one, mv_mbus_dram_info(), which has been around for many
   years. This function returns the raw DRAM ranges, which are
   guaranteed to use power of two sizes, but will overlap with I/O
   windows. This function will therefore be used by all DMA masters
   (SATA, XOR, Ethernet, etc.) except the CESA crypto driver.

 - The new 'nooverlap' variant, mv_mbus_dram_info_nooverlap(). This
   function returns DRAM ranges after they have been "tweaked" to make
   sure they don't overlap with I/O windows. By doing this tweaking,
   we remove the power of two size guarantee. This variant will be
   used by the new CESA crypto driver.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2015-05-28 12:21:08 +02:00
..
arm-cci.c arm-cci: Fix CCI PMU event validation 2015-03-27 13:45:02 +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: imx-weim: improve error handling upon child probe-failure 2015-03-02 21:47:59 +08:00
Kconfig ARM: SoC driver updates for v4.1 2015-04-22 09:18:17 -07:00
Makefile ARM: SoC driver updates for v4.1 2015-04-22 09:18:17 -07:00
mips_cdmm.c MIPS: Add CDMM bus support 2015-03-31 12:04:12 +02:00
mvebu-mbus.c bus: mvebu-mbus: add mv_mbus_dram_info_nooverlap() 2015-05-28 12:21:08 +02:00
omap-ocp2scp.c bus: ocp2scp: SYNC2 value should be changed to 0x6 2015-03-26 10:48:11 -07:00
omap_l3_noc.c genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely 2015-03-05 20:53:06 +01: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 genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely 2015-03-05 20:53:06 +01:00
omap_l3_smx.h drivers: bus: Move the OMAP interconnect driver to drivers/bus/ 2012-09-19 16:53:26 +02:00
simple-pm-bus.c drivers: bus: Add Simple Power-Managed Bus Driver 2015-02-24 06:36:18 +09:00
vexpress-config.c ARM: vexpress: refine dependencies for new code 2014-05-26 21:26:52 +02:00