diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-01-28 06:55:45 -0500 |
---|---|---|
committer | Andrew Lunn <andrew@lunn.ch> | 2015-01-28 12:23:56 -0500 |
commit | dcad68876c21bac709b01eda24e39d4410dc36a8 (patch) | |
tree | bed81a76c1066fd7a9f1f68b30baa7be61d570e5 | |
parent | 38bdf45f4aa5cb6186d50a29e6cbbd9d486a1519 (diff) |
ARM: mvebu: don't set the PL310 in I/O coherency mode when I/O coherency is disabled
Since commit f2c3c67f00 (merge commit that adds commit "ARM: mvebu:
completely disable hardware I/O coherency"), we disable I/O coherency
on Armada EBU platforms.
However, we continue to initialize the coherency fabric, because this
coherency fabric is needed on Armada XP for inter-CPU
coherency. Unfortunately, due to this, we also continued to execute
the coherency fabric initialization code for Armada 375/38x, which
switched the PL310 into I/O coherent mode. This has the effect of
disabling the outer cache sync operation: this is needed when I/O
coherency is enabled to work around a PCIe/L2 deadlock. But obviously,
when I/O coherency is disabled, having the outer cache sync operation
is crucial.
Therefore, this commit fixes the armada_375_380_coherency_init() so
that the PL310 is switched to I/O coherent mode only if I/O coherency
is enabled.
Without this fix, all devices using DMA are broken on Armada 375/38x.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Cc: <stable@vger.kernel.org> # v3.8+
-rw-r--r-- | arch/arm/mach-mvebu/coherency.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index caa21e9b8cd9..ccef8806bb58 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c | |||
@@ -190,6 +190,13 @@ static void __init armada_375_380_coherency_init(struct device_node *np) | |||
190 | arch_ioremap_caller = armada_pcie_wa_ioremap_caller; | 190 | arch_ioremap_caller = armada_pcie_wa_ioremap_caller; |
191 | 191 | ||
192 | /* | 192 | /* |
193 | * We should switch the PL310 to I/O coherency mode only if | ||
194 | * I/O coherency is actually enabled. | ||
195 | */ | ||
196 | if (!coherency_available()) | ||
197 | return; | ||
198 | |||
199 | /* | ||
193 | * Add the PL310 property "arm,io-coherent". This makes sure the | 200 | * Add the PL310 property "arm,io-coherent". This makes sure the |
194 | * outer sync operation is not used, which allows to | 201 | * outer sync operation is not used, which allows to |
195 | * workaround the system erratum that causes deadlocks when | 202 | * workaround the system erratum that causes deadlocks when |