Add Freescale DMA and DMA channel to Documentation/powerpc/booting-without-of.txt file.
Subsystems (3)
PATCH v2 1/2 Add Freescale DMA and DMA channel to Documentation/powerpc/booting-without-of.txt file.
This patch adds Freescale DMA and DMA channel definition to Documentation/powerpc/booting-without-of.txt file.
Signed-off-by Zhang Wei <[email protected]>
Signed-off-by Ebony Zhu <[email protected]>
--- Documentation/powerpc/booting-without-of.txt | 59 ++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-)
Documentation/powerpc/booting-without-of.txt +59 -0
@@ -52,6 +52,8 @@ Table of Contents i) Freescale QUICC Engine module (QE) j) CFI or JEDEC memory-mapped NOR flash k) Global Utilities Block + l) Freescale DMA + m) Freescale DMA channel VII - Specifying interrupt information for devices 1) interrupts property
@@ -2242,6 +2244,63 @@ platforms are moved over to use the flattened-device-tree model. available. For Axon: 0x0000012a + l) Freescale DMA + + The DMA for dma-engine driver of Freescale MPC8540 silicon DMA + controller which also fit for MPC8560, MPC8555, + MPC8548, MPC8641 and MPC8349 silicon DMA controller, + + For each DMA node, you should define channels included. + Please see below 'm) Freescale DMA channel' for DMA channel's definition. + + Required properties: + + - compatible : Should be "fsl,mpc8540-dma" or "fsl,mpc8349-dma" + - reg : Offset and length of DMA general status register. + - ranges : Should be defined as specified in 1) to describe the + DMA controller channels. + + Example: + dma@21000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mpc8540-dma"; + reg = <21300 4>; + ranges = <0 21100 200>; + dma-channel@0 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <0 80>; + interrupt-parent = <&mpic>; + interrupts = <14 2>; + }; + dma-channel@80 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <80 80>; + interrupt-parent = <&mpic>; + interrupts = <15 2>; + }; + dma-channel@100 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <100 80>; + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + dma-channel@180 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <180 80>; + interrupt-parent = <&mpic>; + interrupts = <17 2>; + }; + }; + + m) Freescale DMA channel + + Required properties: + + - compatible : Should be "fsl,mpc8540-dma-channel" + or "fsl,mpc8349-dma-channel" + - reg : Offset and length of the register set for the DMA channel. + More devices will be defined as this spec matures. VII - Specifying interrupt information for devices
Signature · 1 line
1.5.2
PATCH v2 2/2 Add DMA engine and SOC device support to mpc8641hpcn board
Add DMA engine and SOC device support to mpc8641hpcn board
Signed-off-by Zhang Wei <[email protected]>
Signed-off-by Ebony Zhu <[email protected]>
--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 32 ++++++++++++++++++++++++++++ arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 16 ++++++++++++++ 2 files changed, 48 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/mpc8641_hpcn.dts +32 -0
@@ -380,5 +380,37 @@ 01000000 0 00000000 0 00100000>; }; + + dma@21000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mpc8540-dma"; + reg = <21300 4>; + ranges = <0 21100 200>; + dma-channel@0 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <0 80>; + interrupt-parent = <&mpic>; + interrupts = <14 2>; + }; + dma-channel@80 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <80 80>; + interrupt-parent = <&mpic>; + interrupts = <15 2>; + }; + dma-channel@100 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <100 80>; + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + dma-channel@180 { + compatible = "fsl,mpc8540-dma-channel"; + reg = <180 80>; + interrupt-parent = <&mpic>; + interrupts = <17 2>; + }; + }; }; };
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +16 -0
@@ -18,6 +18,7 @@#include <linux/kdev_t.h> #include <linux/delay.h> #include <linux/seq_file.h> +#include <linux/of_platform.h> #include <asm/system.h> #include <asm/time.h>
@@ -227,3 +228,18 @@ define_machine(mpc86xx_hpcn) { .pcibios_fixup_bus = fsl_pcibios_fixup_bus,#endif }; + +static struct of_device_id mpc86xx_of_ids[] = { + { .type ="soc" , }, + {}, +}; + +static __init int mpc86xx_of_device_init (void ) +{ +if (!machine_is (mpc86xx_hpcn)) +return 0 ; + +return of_platform_bus_probe (NULL , mpc86xx_of_ids,NULL ); +} + +device_initcall (mpc86xx_of_device_init);
Signature · 1 line
1.5.2