aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <ijc@debian.org>2015-06-01 21:09:02 +0000
committerIan Campbell <ijc@debian.org>2015-06-01 21:09:02 +0000
commit829384f516ed48face12b57a53ec7675c66c0599 (patch)
treef3fe8af8d345181f7dcecf3372b8a72e8778c506
parenta612c800157464334bbb8e34f09418e3346e127d (diff)
downloadkernel_replicant_linux-829384f516ed48face12b57a53ec7675c66c0599.tar.gz
kernel_replicant_linux-829384f516ed48face12b57a53ec7675c66c0599.tar.bz2
kernel_replicant_linux-829384f516ed48face12b57a53ec7675c66c0599.zip
[arm] Fix mvebu-mbus for non-io-coherent platforms.
svn path=/dists/sid/linux/; revision=22729
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/bugfix/armel/bus-mvebu-mbus-do-not-set-WIN_CTRL_SYNCBARRIER-on-no.patch50
-rw-r--r--debian/patches/series1
3 files changed, 53 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 095dec4c73d5..5357bf70282c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ linux (4.0.4-2) UNRELEASED; urgency=medium
* [armhf] Enable PCIe support for IMX6 boards. Patch from Vagrant
Cascadian (Closes: #787029)
* [armhf] Add stmmac-platform module to nic-modules udeb. (Closes: #786716)
+ * [arm] Fix mvebu-mbus for non-io-coherent platforms. In particular
+ armel/{orion5x,kirkwood}.
-- Ben Hutchings <ben@decadent.org.uk> Wed, 27 May 2015 21:36:56 +0100
diff --git a/debian/patches/bugfix/armel/bus-mvebu-mbus-do-not-set-WIN_CTRL_SYNCBARRIER-on-no.patch b/debian/patches/bugfix/armel/bus-mvebu-mbus-do-not-set-WIN_CTRL_SYNCBARRIER-on-no.patch
new file mode 100644
index 000000000000..c465b62524bf
--- /dev/null
+++ b/debian/patches/bugfix/armel/bus-mvebu-mbus-do-not-set-WIN_CTRL_SYNCBARRIER-on-no.patch
@@ -0,0 +1,50 @@
+From f16b8208c320e4f8433a03acb7756d90f1b57981 Mon Sep 17 00:00:00 2001
+From: Nicolas Schichan <nschichan@freebox.fr>
+Date: Thu, 28 May 2015 10:40:12 +0200
+Subject: [PATCH] bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non
+ io-coherent platforms.
+Origin: http://article.gmane.org/gmane.linux.kernel.stable/137371
+
+Commit a0b5cd4ac2d6 ("bus: mvebu-mbus: use automatic I/O
+synchronization barriers") enabled the usage of automatic I/O
+synchronization barriers by enabling bit WIN_CTRL_SYNCBARRIER in the
+control registers of MBus windows, but on non io-coherent platforms
+(orion5x, kirkwood and dove) the WIN_CTRL_SYNCBARRIER bit in
+the window control register is either reserved (all windows except 6
+and 7) or enables read-only protection (windows 6 and 7).
+
+Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
+Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Cc: <stable@vger.kernel.org> # v4.0+
+Fixes: a0b5cd4ac2d6 ("bus: mvebu-mbus: use automatic I/O synchronization barriers")
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ drivers/bus/mvebu-mbus.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
+index fb9ec62..7fa4510 100644
+--- a/drivers/bus/mvebu-mbus.c
++++ b/drivers/bus/mvebu-mbus.c
+@@ -70,6 +70,7 @@
+ */
+ #define WIN_CTRL_OFF 0x0000
+ #define WIN_CTRL_ENABLE BIT(0)
++/* Only on HW I/O coherency capable platforms */
+ #define WIN_CTRL_SYNCBARRIER BIT(1)
+ #define WIN_CTRL_TGT_MASK 0xf0
+ #define WIN_CTRL_TGT_SHIFT 4
+@@ -323,8 +324,9 @@ static int mvebu_mbus_setup_window(struct mvebu_mbus_state *mbus,
+ ctrl = ((size - 1) & WIN_CTRL_SIZE_MASK) |
+ (attr << WIN_CTRL_ATTR_SHIFT) |
+ (target << WIN_CTRL_TGT_SHIFT) |
+- WIN_CTRL_SYNCBARRIER |
+ WIN_CTRL_ENABLE;
++ if (mbus->hw_io_coherency)
++ ctrl |= WIN_CTRL_SYNCBARRIER;
+
+ writel(base & WIN_BASE_LOW, addr + WIN_BASE_OFF);
+ writel(ctrl, addr + WIN_CTRL_OFF);
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index d0be5e2d5cae..836e67898636 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -42,6 +42,7 @@ bugfix/mips/disable-advansys.patch
bugfix/arm64/arm64-add-missing-dts-entry-for-X-Gene-platform.patch
bugfix/arm64/arm64-removed-using-of-the-mask-attribute-in-the-dts.patch
bugfix/x86/config-enable-need_dma_map_state-by-default-when-swi.patch
+bugfix/armel/bus-mvebu-mbus-do-not-set-WIN_CTRL_SYNCBARRIER-on-no.patch
# Arch features
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch