Skip to contentSkip to conversation

mpc85xx_ds add DMA engine to the DT and parse it.

RFC/PATCH Applied Sebastian Siewior 2 participants 7 messages Mar 11, 2008 – Apr 10, 2008

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

The DT entry is copy / paste from the documentation.

---
 arch/powerpc/boot/dts/mpc8544ds.dts      |   41 ++++++++++++++++++++++++++++++
 arch/powerpc/platforms/85xx/mpc85xx_ds.c |   13 +++++++++
 2 files changed, 54 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/mpc8544ds.dts +41 -0
index 688af9d..fdaf793 100644
@@ -116,6 +116,47 @@
 			};
 		};
 
+		dma@21300 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma";
+			reg = <21300 4>;
+			ranges = <0 21100 200>;
+			cell-index = <0>;
+			dma-channel@0 {
+				compatible = "fsl,mpc8540-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <0 80>;
+				cell-index = <0>;
+				interrupt-parent = <&mpic>;
+				interrupts = <14 2>;
+			};
+			dma-channel@80 {
+				compatible = "fsl,mpc8540-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <80 80>;
+				cell-index = <1>;
+				interrupt-parent = <&mpic>;
+				interrupts = <15 2>;
+			};
+			dma-channel@100 {
+				compatible = "fsl,mpc8540-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <100 80>;
+				cell-index = <2>;
+				interrupt-parent = <&mpic>;
+				interrupts = <16 2>;
+			};
+			dma-channel@180 {
+				compatible = "fsl,mpc8540-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <180 80>;
+				cell-index = <3>;
+				interrupt-parent = <&mpic>;
+				interrupts = <17 2>;
+			};
+		};
+
 		enet0: ethernet@24000 {
 			cell-index = <0>;
 			device_type = "network";
arch/powerpc/platforms/85xx/mpc85xx_ds.c +13 -0
index bdb3d0b..b9a3094 100644
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/interrupt.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/time.h>
@@ -183,6 +184,18 @@ static int __init mpc8544_ds_probe(void)
 	}
 }
 
+static struct of_device_id mpc85xxds_ids[] = {
+	{ .type = "soc", },
+	{ .compatible = "soc", },
+	{},
+};
+
+static int __init mpc85xxds_publish_devices(void)
+{
+	return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL);
+}
+machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices);
+
 /*
  * Called very early, device-tree isn't unflattened
  */
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 17 lines · Sebastian Siewior

The DT entry is copy / paste from the documentation.

---
arch/powerpc/boot/dts/mpc8544ds.dts | 41 +++++++++++++++++++++
+++++++++
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 13 +++++++++

2 files changed, 54 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/mpc8544ds.dts +0 -0
index 688af9d..fdaf793 100644
@@ -116,6 +116,47 @@
 			};
 		};
 

arch/powerpc/boot/dts/mpc8544ds.dts line 128

Quoted 10 lines
arch/powerpc/boot/dts/mpc8544ds.dts +10 -0
+		dma@21300 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma";
+			reg = <21300 4>;
+			ranges = <0 21100 200>;
+			cell-index = <0>;
+			dma-channel@0 {
+				compatible = "fsl,mpc8540-dma-channel",
+						"fsl,eloplus-dma-channel";

this should be mpc8544-dma everywhere.

- k

#2 lore raw

PATCH v2 1/1 mpc85xx_ds add DMA engine to the DT and parse it.

This is a modified entry I found in the documentation for the 8544.

---
 arch/powerpc/boot/dts/mpc8544ds.dts      |   41 ++++++++++++++++++++++++++++++
 arch/powerpc/platforms/85xx/mpc85xx_ds.c |   13 +++++++++
 2 files changed, 54 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/mpc8544ds.dts +41 -0
index 688af9d..131ffaa 100644
@@ -116,6 +116,47 @@
 			};
 		};
 
+		dma@21300 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8544-dma", "fsl,eloplus-dma";
+			reg = <21300 4>;
+			ranges = <0 21100 200>;
+			cell-index = <0>;
+			dma-channel@0 {
+				compatible = "fsl,mpc8544-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <0 80>;
+				cell-index = <0>;
+				interrupt-parent = <&mpic>;
+				interrupts = <14 2>;
+			};
+			dma-channel@80 {
+				compatible = "fsl,mpc8544-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <80 80>;
+				cell-index = <1>;
+				interrupt-parent = <&mpic>;
+				interrupts = <15 2>;
+			};
+			dma-channel@100 {
+				compatible = "fsl,mpc8544-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <100 80>;
+				cell-index = <2>;
+				interrupt-parent = <&mpic>;
+				interrupts = <16 2>;
+			};
+			dma-channel@180 {
+				compatible = "fsl,mpc8544-dma-channel",
+						"fsl,eloplus-dma-channel";
+				reg = <180 80>;
+				cell-index = <3>;
+				interrupt-parent = <&mpic>;
+				interrupts = <17 2>;
+			};
+		};
+
 		enet0: ethernet@24000 {
 			cell-index = <0>;
 			device_type = "network";
arch/powerpc/platforms/85xx/mpc85xx_ds.c +13 -0
index bdb3d0b..b9a3094 100644
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/interrupt.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/time.h>
@@ -183,6 +184,18 @@ static int __init mpc8544_ds_probe(void)
 	}
 }
 
+static struct of_device_id mpc85xxds_ids[] = {
+	{ .type = "soc", },
+	{ .compatible = "soc", },
+	{},
+};
+
+static int __init mpc85xxds_publish_devices(void)
+{
+	return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL);
+}
+machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices);
+
 /*
  * Called very early, device-tree isn't unflattened
  */
Signature · 1 line
1.5.4.3
Applied
#3 lore raw
Quoted 8 lines · Sebastian Siewior

This is a modified entry I found in the documentation for the 8544.

---
arch/powerpc/boot/dts/mpc8544ds.dts | 41 +++++++++++++++++++++
+++++++++
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 13 +++++++++

2 files changed, 54 insertions(+), 0 deletions(-)

applied.

I also added updating the defconfig to enable the driver by default.

- k

#4 lore raw
Quoted 10 lines · * Kumar Gala | 2008-04-10 09:46:39 [-0500]:
Quoted 8 lines

This is a modified entry I found in the documentation for the 8544.

---
arch/powerpc/boot/dts/mpc8544ds.dts | 41 +++++++++++++++++++++
+++++++++
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 13 +++++++++

2 files changed, 54 insertions(+), 0 deletions(-)

applied.

Thank you.

Quoted 1 line

I also added updating the defconfig to enable the driver by default.

I just noticed that commit 049c9d455 renamed the ids. I couldn't find this commit in your git tree. Did you rename the ids in the .dts file (or want me to do this)?

Quoted 1 line

- k

Sebastian

#5 lore raw
Quoted 12 lines · Sebastian Siewior
Quoted 10 lines · * Kumar Gala | 2008-04-10 09:46:39 [-0500]:
Quoted 9 lines

This is a modified entry I found in the documentation for the 8544.

---
arch/powerpc/boot/dts/mpc8544ds.dts | 41 +++++++++++++++++++
++
+++++++++
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 13 +++++++++

2 files changed, 54 insertions(+), 0 deletions(-)
Quoted 7 lines
Quoted 1 line

applied.

Thank you.

Quoted 1 line

I also added updating the defconfig to enable the driver by default.

I just noticed that commit 049c9d455 renamed the ids. I couldn't find this commit in your git tree. Did you rename the ids in the .dts file (or want me to do this)?

I think they are already in sync am I missing something?

- k

#6 lore raw
Quoted 6 lines · * Kumar Gala | 2008-04-10 10:33:11 [-0500]:
Quoted 4 lines
Quoted 1 line

I also added updating the defconfig to enable the driver by default.

I just noticed that commit 049c9d455 renamed the ids. I couldn't find this commit in your git tree. Did you rename the ids in the .dts file (or want me to do this)?

I think they are already in sync am I missing something?

Ah, the .dts has mpc8544* and eloplus* so it should be fine. Just got confused by the another commit.

Quoted 1 line

- k

Sebastian