From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Fri, 22 Feb 2013 14:46:06 +0000 Subject: [PATCH] dma: imx-dma: Add oftree support In-Reply-To: <1361543838-12604-1-git-send-email-mpa@pengutronix.de> References: <1361543838-12604-1-git-send-email-mpa@pengutronix.de> Message-ID: <201302221446.07069.arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Friday 22 February 2013, Markus Pargmann wrote: > Adding devicetree support for imx-dma driver. Use driver name for > function 'imx_dma_is_general_purpose' because the devicename for > devicetree initialized devices is different. > > Signed-off-by: Markus Pargmann Hi Markus, Please make sure you are following the generic dma binding from Documentation/devicetree/bindings/dma/dma.txt that is getting added in Linux-3.9. > +++ b/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt > @@ -0,0 +1,13 @@ > +* Freescale Direct Memory Access (DMA) Controller for i.MX > + > +Required properties: > +- compatible : Should be "fsl,-dma". chip can be imx1, imx21 or imx27 > +- reg : Should contain DMA registers location and length > +- interrupts : First item should be DMA interrupt, second one is optional and > + should contain DMA Error interrupt > + > +dma: dma at 10001000 { > + compatible = "fsl,imx27-dma"; > + reg = <0x10001000 0x1000>; > + interrupts = <32 33>; > +}; In particular, the "#dma-cells" property is required here, along with dma-channels and dma-requests. You also need to describe the format of the "dmas" property in slave drivers referring to this node. In a lot of cases, you only need a single cell there, which is the request line number. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] dma: imx-dma: Add oftree support Date: Fri, 22 Feb 2013 14:46:06 +0000 Message-ID: <201302221446.07069.arnd@arndb.de> References: <1361543838-12604-1-git-send-email-mpa@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1361543838-12604-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Markus Pargmann Cc: vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, djbw-b10kYP2dOMg@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On Friday 22 February 2013, Markus Pargmann wrote: > Adding devicetree support for imx-dma driver. Use driver name for > function 'imx_dma_is_general_purpose' because the devicename for > devicetree initialized devices is different. > > Signed-off-by: Markus Pargmann Hi Markus, Please make sure you are following the generic dma binding from Documentation/devicetree/bindings/dma/dma.txt that is getting added in Linux-3.9. > +++ b/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt > @@ -0,0 +1,13 @@ > +* Freescale Direct Memory Access (DMA) Controller for i.MX > + > +Required properties: > +- compatible : Should be "fsl,-dma". chip can be imx1, imx21 or imx27 > +- reg : Should contain DMA registers location and length > +- interrupts : First item should be DMA interrupt, second one is optional and > + should contain DMA Error interrupt > + > +dma: dma@10001000 { > + compatible = "fsl,imx27-dma"; > + reg = <0x10001000 0x1000>; > + interrupts = <32 33>; > +}; In particular, the "#dma-cells" property is required here, along with dma-channels and dma-requests. You also need to describe the format of the "dmas" property in slave drivers referring to this node. In a lot of cases, you only need a single cell there, which is the request line number. Arnd