From patchwork Wed Apr 16 17:13:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Yanovich X-Patchwork-Id: 4003081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6A688BFF02 for ; Wed, 16 Apr 2014 17:17:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BB0F2025B for ; Wed, 16 Apr 2014 17:17:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AB21220374 for ; Wed, 16 Apr 2014 17:17:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaTQl-00013V-1a; Wed, 16 Apr 2014 17:15:27 +0000 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaTQB-0007m6-0t for linux-arm-kernel@lists.infradead.org; Wed, 16 Apr 2014 17:14:51 +0000 Received: by mail-la0-f45.google.com with SMTP id hr17so8345628lab.18 for ; Wed, 16 Apr 2014 10:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+aKUnVdM6I6C8+X+DAAFF9et2+A25tujkOySDJjuSEQ=; b=N17iGI8Ka1b0PuyW0Walos8kLYl9o/OSem0zvipbHehnPvqWuAU0CgZJ64f7f/25LW Ko+d7PQ6yjiskCY3bhC4kP+k7egfILrCifaWz8yJ5/00L9vnP9FRzUfzWWGMss13gVPH WUl0iWQ4tXZxzyhWhgc6PxyuIBopLTjj5avcx9Q66+coL2depgqrHcIvQqYR3rhMt7kT 6ZCO7yyoydXCLZqqDsSR7CmYdkp6ezGLJFVHr7IddsP5l9BNtKsTned1D4Ucm7aOkiMH +7woiHnOq5AvBSGlb/j1J8IodXU66A3rWc85uXh0CE6arWPmyDN6oYhpRi2gO91BRA0P CqIA== X-Received: by 10.152.7.97 with SMTP id i1mr2590906laa.36.1397668468455; Wed, 16 Apr 2014 10:14:28 -0700 (PDT) Received: from host5.omatika.ru (0893675324.static.corbina.ru. [95.31.1.192]) by mx.google.com with ESMTPSA id jp6sm21178322lbc.15.2014.04.16.10.14.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Apr 2014 10:14:27 -0700 (PDT) From: Sergei Ianovich To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 06/21] ARM: dts: provide DMA config to pxamci on PXA27x Date: Wed, 16 Apr 2014 21:13:16 +0400 Message-Id: <1397668411-27162-7-git-send-email-ynvich@gmail.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1397668411-27162-1-git-send-email-ynvich@gmail.com> References: <1387309071-22382-1-git-send-email-ynvich@gmail.com> <1397668411-27162-1-git-send-email-ynvich@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140416_101451_263472_E7A71396 X-CRM114-Status: GOOD ( 13.11 ) X-Spam-Score: -0.1 (/) Cc: Mark Rutland , "open list:OPEN FIRMWARE AND..." , Russell King , Arnd Bergmann , Pawel Moll , Ian Campbell , Randy Dunlap , "open list:DOCUMENTATION" , Haojian Zhuang , Daniel Mack , Sergei Ianovich , Rob Herring , Kumar Gala X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Non-dts implementation supply required DMA channel numbers as IORESOURCE_DMA. We can also get them from the device tree, if it is present. This patch updates device tree with the proper dmaengine-based "marvell,pdma-1.0" DMA. There is no actual data handling in this patch, because the existing driver cannot get DMA channel number from dmaengine API. The patch in the series will provide temporary workaround by manually parsing node attributes, until Daniel's series is ready to be merged. Signed-off-by: Sergei Ianovich CC: Daniel Mack CC: Haojian Zhuang CC: Arnd Bergmann --- v3..v4 * no changes v2..v3 * split into good (this one) and temporary (PATCH 07/21) parts v1..v2 * add binding for next-gen dma controller * use correct dma declararion * number changed from 5 to 3 Documentation/devicetree/bindings/mmc/pxa-mmc.txt | 5 +++++ arch/arm/boot/dts/pxa27x.dtsi | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/pxa-mmc.txt b/Documentation/devicetree/bindings/mmc/pxa-mmc.txt index b7025de..9f54c69 100644 --- a/Documentation/devicetree/bindings/mmc/pxa-mmc.txt +++ b/Documentation/devicetree/bindings/mmc/pxa-mmc.txt @@ -5,6 +5,8 @@ Driver bindings for the PXA MCI (MMC/SDIO) interfaces Required properties: - compatible: Should be "marvell,pxa-mmc". - vmmc-supply: A regulator for VMMC +- dmas: Should be DMA specifiers for RX and TX +- dma-names: Should be "rx" and "tx" Optional properties: - marvell,detect-delay-ms: sets the detection delay timeout in ms. @@ -21,5 +23,8 @@ mmc0: mmc@41100000 { interrupts = <23>; cd-gpios = <&gpio 23 0>; wp-gpios = <&gpio 24 0>; + dmas = <&dma 21 + &dma 22>; + dma-names = "rx", "tx"; }; diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi index 39bed5e..0150531 100644 --- a/arch/arm/boot/dts/pxa27x.dtsi +++ b/arch/arm/boot/dts/pxa27x.dtsi @@ -35,10 +35,24 @@ #pwm-cells = <1>; }; + dma: dma-controller@40000000 { + compatible = "marvell,pdma-1.0"; + reg = <0x40000000 0x10000>; + interrupts = <25>; + #dma-cells = <1>; + dma-channels = <32>; + }; + gpio: gpio@40e00000 { compatible = "intel,pxa27x-gpio"; interrupts = <8>, <9>, <10>; interrupt-names = "gpio0", "gpio1", "gpio_mux"; }; + + mmc@41100000 { + dmas = <&dma 21 + &dma 22>; + dma-names = "rx", "tx"; + }; }; };