Skip to contentSkip to conversation

fsldma: the MPC8377MDS board device tree node for fsldma driver

PATCH In review [email protected] 3 participants 3 messages May 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsldma: the MPC8377MDS board device tree node for fsldma driver

From: Zhang Wei <[email protected]>

The fsldma driver is tested on MPC8377MDS board. The patch adds fsldma driver support into MPC8377MDS device tree.

Cc "Nelson, Shannon" <[email protected]>
Cc Dan Williams <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>

---

 arch/powerpc/boot/dts/mpc8377_mds.dts |   27 ++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/powerpc/boot/dts/mpc8377_mds.dts renamed from arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +27 -0
diff -puN arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -295,6 +295,33 @@
 			};
 		};
 
+		dma@82a8 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8349-dma";
+			reg = <0x82a8 4>;
+			ranges = <0 0x8100 0x1a8>;
+			interrupt-parent = <&ipic>;
+			interrupts = <0x47 8>;
+			cell-index = <0>;
+			dma-channel@0 {
+				compatible = "fsl,mpc8349-dma-channel";
+				reg = <0 0x80>;
+			};
+			dma-channel@80 {
+				compatible = "fsl,mpc8349-dma-channel";
+				reg = <0x80 0x80>;
+			};
+			dma-channel@100 {
+				compatible = "fsl,mpc8349-dma-channel";
+				reg = <0x100 0x80>;
+			};
+			dma-channel@180 {
+				compatible = "fsl,mpc8349-dma-channel";
+				reg = <0x180 0x28>;
+			};
+		};
+
 		/* IPIC
 		 * interrupts cell = <intr #, sense>
 		 * sense values match linux IORESOURCE_IRQ_* defines:

_

#1 lore raw
Quoted 39 lines · [email protected] wrote:

From: Zhang Wei <[email protected]>

The fsldma driver is tested on MPC8377MDS board. The patch adds fsldma driver support into MPC8377MDS device tree.

Cc "Nelson, Shannon" <[email protected]>
Cc Dan Williams <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>

---

 arch/powerpc/boot/dts/mpc8377_mds.dts |   27 ++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff -puN arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver arch/powerpc/boot/dts/mpc8377_mds.dts

arch/powerpc/boot/dts/mpc8377_mds.dts renamed from arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +15 -0
@@ -295,6 +295,33 @@
 			};
 		};
 
+		dma@82a8 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8349-dma";
+			reg = <0x82a8 4>;
+			ranges = <0 0x8100 0x1a8>;
+			interrupt-parent = <&ipic>;
+			interrupts = <0x47 8>;
+			cell-index = <0>;
+			dma-channel@0 {
+				compatible = "fsl,mpc8349-dma-channel";
+				reg = <0 0x80>;
+			};
+			dma-channel@80 {
+				compatible = "fsl,mpc8349-dma-channel";

arch/powerpc/boot/dts/mpc8377_mds.dts line 322

Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts renamed from arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +10 -0
+				reg = <0x80 0x80>;
+			};
+			dma-channel@100 {
+				compatible = "fsl,mpc8349-dma-channel";
+				reg = <0x100 0x80>;
+			};
+			dma-channel@180 {
+				compatible = "fsl,mpc8349-dma-channel";
+				reg = <0x180 0x28>;
+			};

According to booting-without-of.txt, the interrupts property should be repeated in each channel. The driver also needs to be fixed to remember whether it registered a DMA-block-level interrupt handler already, and not try to register a channel interrupt.

-Scott

#2 lore raw

[adding Li Yang (new fsldma maintainer) to the cc]

Quoted 59 lines · Scott Wood
Quoted 39 lines · [email protected] wrote:

From: Zhang Wei <[email protected]>

The fsldma driver is tested on MPC8377MDS board. The patch adds fsldma driver support into MPC8377MDS device tree.

Cc "Nelson, Shannon" <[email protected]>
Cc Dan Williams <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>

---

 arch/powerpc/boot/dts/mpc8377_mds.dts |   27 ++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff -puN arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver arch/powerpc/boot/dts/mpc8377_mds.dts

arch/powerpc/boot/dts/mpc8377_mds.dts renamed from arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +15 -0
@@ -295,6 +295,33 @@
                      };
              };
 
+             dma@82a8 {
+                     #address-cells = <1>;
+                     #size-cells = <1>;
+                     compatible = "fsl,mpc8349-dma";
+                     reg = <0x82a8 4>;
+                     ranges = <0 0x8100 0x1a8>;
+                     interrupt-parent = <&ipic>;
+                     interrupts = <0x47 8>;
+                     cell-index = <0>;
+                     dma-channel@0 {
+                             compatible = "fsl,mpc8349-dma-channel";
+                             reg = <0 0x80>;
+                     };
+                     dma-channel@80 {
+                             compatible = "fsl,mpc8349-dma-channel";

arch/powerpc/boot/dts/mpc8377_mds.dts line 322

Quoted 10 lines
arch/powerpc/boot/dts/mpc8377_mds.dts renamed from arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +10 -0
+                             reg = <0x80 0x80>;
+                     };
+                     dma-channel@100 {
+                             compatible = "fsl,mpc8349-dma-channel";
+                             reg = <0x100 0x80>;
+                     };
+                     dma-channel@180 {
+                             compatible = "fsl,mpc8349-dma-channel";
+                             reg = <0x180 0x28>;
+                     };

According to booting-without-of.txt, the interrupts property should be repeated in each channel. The driver also needs to be fixed to remember whether it registered a DMA-block-level interrupt handler already, and not try to register a channel interrupt.

-Scott