[GIT PULL] Marvell XOR driver DT changes

4 messages, 1 author, 2012-11-19 · open the first message on its own page

[GIT PULL] Marvell XOR driver DT changes

From: Thomas Petazzoni <hidden>
Date: 2012-11-19 10:11:40

Jason,

Here is the DT/board changes related to the Marvell XOR driver.

Compared to v1:

 * Addition of the Kirkwood and Dove integration, provided
   respectively by Andrew Lunn and Sebastian Hesselbarth.

This must be applied on top of the Marvell XOR driver cleanup and DT
binding patch series, which itself applies on top of the clk work from
Andrew Lunn.

Thanks!

The following changes since commit 7a008db916df99af0cd1d765badcb3e4261b4021:

  dma: mv_xor: Add a device_control function (2012-11-19 10:53:30 +0100)

are available in the git repository at:

  git at github.com:MISL-EBU-System-SW/mainline-public.git tags/marvell-xor-board-dt-changes-3.8

for you to fetch changes up to 18731aa5e333017fae0b32f85156711300571328:

  arm: dove: Convert Dove to DT XOR DMA engine (2012-11-19 10:53:32 +0100)

----------------------------------------------------------------
Marvell XOR driver DT/board changes for 3.8

----------------------------------------------------------------
Andrew Lunn (1):
      arm: kirkwood: Convert XOR instantiation to DT.

Sebastian Hesselbarth (1):
      arm: dove: Convert Dove to DT XOR DMA engine

Thomas Petazzoni (1):
      arm: mvebu: add XOR engines to Armada 370/XP .dtsi

 arch/arm/boot/dts/armada-370-xp.dtsi |   20 ++++++++++++++++
 arch/arm/boot/dts/dove.dtsi          |   42 ++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood.dtsi      |   40 ++++++++++++++++++++++++++++++++
 arch/arm/mach-dove/common.c          |   10 --------
 arch/arm/mach-kirkwood/board-dt.c    |   13 -----------
 5 files changed, 102 insertions(+), 23 deletions(-)

[PATCH 1/3] arm: mvebu: add XOR engines to Armada 370/XP .dtsi

From: Thomas Petazzoni <hidden>
Date: 2012-11-19 10:11:41

This patch adds the necessary DT data in the Armada 370/XP Device
Trees.

Signed-off-by: Thomas Petazzoni <redacted>
---
 arch/arm/boot/dts/armada-370-xp.dtsi |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 94b4b9e..8a3d490 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -69,6 +69,26 @@
 			compatible = "marvell,armada-addr-decoding-controller";
 			reg = <0xd0020000 0x258>;
 		};
+
+		xor at d0060900 {
+			compatible = "marvell,orion-xor";
+			reg = <0xd0060900 0x100
+			       0xd0060b00 0x100>;
+			clocks = <&coreclk 0>;
+			status = "okay";
+
+			xor00 {
+			      interrupts = <51>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			};
+			xor01 {
+			      interrupts = <52>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			      dmacap,memset;
+			};
+		};
 	};
 };
 
-- 
1.7.9.5

[PATCH 2/3] arm: kirkwood: Convert XOR instantiation to DT.

From: Thomas Petazzoni <hidden>
Date: 2012-11-19 10:11:42

From: Andrew Lunn <andrew@lunn.ch>

Use DT to describe the two XOR DMA engines on Kirkwood. Remove the
C code initialization.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Thomas Petazzoni <redacted>
---
 arch/arm/boot/dts/kirkwood.dtsi   |   40 +++++++++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-dt.c |   13 ------------
 2 files changed, 40 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index e5ebf42..83716ee 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -94,6 +94,46 @@
 			status = "okay";
 		};
 
+		xor at 60800 {
+			compatible = "marvell,orion-xor";
+			reg = <0x60800 0x100
+			       0x60A00 0x100>;
+			status = "okay";
+			clocks = <&gate_clk 8>;
+
+			xor00 {
+			      interrupts = <5>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			};
+			xor01 {
+			      interrupts = <6>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			      dmacap,memset;
+			};
+		};
+
+		xor at 60900 {
+			compatible = "marvell,orion-xor";
+			reg = <0x60900 0x100
+			       0xd0B00 0x100>;
+			status = "okay";
+			clocks = <&gate_clk 16>;
+
+			xor00 {
+			      interrupts = <7>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			};
+			xor01 {
+			      interrupts = <8>;
+			      dmacap,memcpy;
+			      dmacap,xor;
+			      dmacap,memset;
+			};
+		};
+
 		sata at 80000 {
 			compatible = "marvell,orion-sata";
 			reg = <0x80000 0x5000>;
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 994ce26..5cabdff 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -21,7 +21,6 @@
 #include <asm/mach/map.h>
 #include <mach/bridge-regs.h>
 #include <linux/platform_data/usb-ehci-orion.h>
-#include <linux/platform_data/dma-mv_xor.h>
 #include <plat/irq.h>
 #include <plat/common.h>
 #include "common.h"
@@ -60,14 +59,6 @@ static void __init kirkwood_legacy_clk_init(void)
 	orion_clkdev_add(NULL, "orion-ehci.0",
 			 of_clk_get_from_provider(&clkspec));
 
-	clkspec.args[0] = CGC_BIT_XOR0;
-	orion_clkdev_add(NULL, MV_XOR_NAME ".0",
-			 of_clk_get_from_provider(&clkspec));
-
-	clkspec.args[0] = CGC_BIT_XOR1;
-	orion_clkdev_add(NULL, MV_XOR_NAME ".1",
-			 of_clk_get_from_provider(&clkspec));
-
 	clkspec.args[0] = CGC_BIT_PEX1;
 	orion_clkdev_add("1", "pcie",
 			 of_clk_get_from_provider(&clkspec));
@@ -104,10 +95,6 @@ static void __init kirkwood_dt_init(void)
 	/* Setup root of clk tree */
 	kirkwood_of_clk_init();
 
-	/* internal devices that every board has */
-	kirkwood_xor0_init();
-	kirkwood_xor1_init();
-
 #ifdef CONFIG_KEXEC
 	kexec_reinit = kirkwood_enable_pcie;
 #endif
-- 
1.7.9.5

[PATCH 3/3] arm: dove: Convert Dove to DT XOR DMA engine

From: Thomas Petazzoni <hidden>
Date: 2012-11-19 10:11:43

From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

With DT support for Marvell XOR DMA engine, make use of it on Dove.
Also remove the now redundant code in DT board init for xor engines.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Thomas Petazzoni <redacted>
---
 arch/arm/boot/dts/dove.dtsi |   42 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-dove/common.c |   10 ----------
 2 files changed, 42 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 8c8ab621..ff56bff 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -174,5 +174,47 @@
 			clocks = <&gate_clk 15>;
 			status = "okay";
 		};
+
+		xor0: dma-engine at 60800 {
+			compatible = "marvell,orion-xor";
+			reg = <0x60800 0x100
+			       0x60a00 0x100>;
+			clocks = <&gate_clk 23>;
+			status = "okay";
+
+			channel0 {
+				interrupts = <39>;
+				dmacap,memcpy;
+				dmacap,xor;
+			};
+
+			channel1 {
+				interrupts = <40>;
+				dmacap,memset;
+				dmacap,memcpy;
+				dmacap,xor;
+			};
+		};
+
+		xor1: dma-engine at 60900 {
+			compatible = "marvell,orion-xor";
+			reg = <0x60900 0x100
+			       0x60b00 0x100>;
+			clocks = <&gate_clk 24>;
+			status = "okay";
+
+			channel0 {
+				interrupts = <42>;
+				dmacap,memcpy;
+				dmacap,xor;
+			};
+
+			channel1 {
+				interrupts = <43>;
+				dmacap,memset;
+				dmacap,memcpy;
+				dmacap,xor;
+			};
+		};
 	};
 };
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index a209444..97a7abe 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -409,14 +409,6 @@ static void __init dove_legacy_clk_init(void)
 	clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
 	orion_clkdev_add("1", "pcie",
 			 of_clk_get_from_provider(&clkspec));
-
-	clkspec.args[0] = CLOCK_GATING_BIT_XOR0;
-	orion_clkdev_add(NULL, MV_XOR_NAME ".0",
-			 of_clk_get_from_provider(&clkspec));
-
-	clkspec.args[0] = CLOCK_GATING_BIT_XOR1;
-	orion_clkdev_add(NULL, MV_XOR_NAME ".1",
-			 of_clk_get_from_provider(&clkspec));
 }
 
 static void __init dove_of_clk_init(void)
@@ -445,8 +437,6 @@ static void __init dove_dt_init(void)
 
 	/* Internal devices not ported to DT yet */
 	dove_rtc_init();
-	dove_xor0_init();
-	dove_xor1_init();
 
 	dove_ge00_init(&dove_dt_ge00_data);
 	dove_ehci0_init();
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help