From patchwork Wed Jun 26 14:40:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2785611 Return-Path: X-Original-To: patchwork-linux-sh@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 14DAEC0AB1 for ; Wed, 26 Jun 2013 14:41:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D310F2055B for ; Wed, 26 Jun 2013 14:41:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9541820555 for ; Wed, 26 Jun 2013 14:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751421Ab3FZOlN (ORCPT ); Wed, 26 Jun 2013 10:41:13 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:60220 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501Ab3FZOlL (ORCPT ); Wed, 26 Jun 2013 10:41:11 -0400 Received: from axis700.grange (dslb-178-001-151-028.pools.arcor-ip.net [178.1.151.28]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LZjNw-1UQAa626Zg-00m5go; Wed, 26 Jun 2013 16:40:58 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 6959940BC3; Wed, 26 Jun 2013 16:40:57 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1Urqu1-0002b5-0O; Wed, 26 Jun 2013 16:40:57 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH v3 5/7] ARM: shmobile: r8a7740: add DT nodes for three DMAC instance Date: Wed, 26 Jun 2013 16:40:54 +0200 Message-Id: <1372257656-9944-6-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1372257656-9944-1-git-send-email-g.liakhovetski@gmx.de> References: <1372257656-9944-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:pQpp4QUpIOcbXc5CBYPf0DtDLSu+s618cFGbBz0wek/ 8+FTfvR5DlMMd2RegIh5EZEk3xzi/FLfwCl6pa5tDpyTGboqD8 l8bpPV40Nbve61nRPle2cx23cSukBSKpUYjfYdAGaizcmcTW6K Qmna9+uIqj6iTmJoMwqtuaO48gtKn0x4ZhuIaDyBNg3Kp54vFn 1hIXcU0geiC836bxx1BxXab4p4rt7I4i7autuOAHT7+zsudZe8 SFlzj9PoOon6SEEcbbLmlYBCMO11O9r7YfMI4ND5QYRzKqIzig TQkSMHCpF8dGfv3gpoWGU6vWnV9FAgNFnqk3yfumq23QCC/Fqu agnNpkpdnsvWEzjz091E31s0jclLmrjPn9sQGqFkBxJuboz1vf Q55GVHJp23zJA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 This patch adds Device Tree support for the three DMA controller instances on r8a7740 in a DMA multiplexer node. Signed-off-by: Guennadi Liakhovetski --- arch/arm/boot/dts/r8a7740.dtsi | 62 ++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-r8a7740.c | 12 ++++++ 2 files changed, 74 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index 25dc930..683751c 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi @@ -112,6 +112,68 @@ 0 149 0x4>; }; + dmac: dma-mux0 { + compatible = "renesas,shdma-mux"; + #dma-cells = <1>; + dma-channels = <6>; + dma-requests = <256>; + reg = <0 0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dma0: shdma@fe008020 { + compatible = "renesas,shdma"; + reg = <0xfe008020 0x270>, + <0xfe009000 0xc>; + interrupt-parent = <&gic>; + interrupts = <0 34 4 + 0 28 4 + 0 29 4 + 0 30 4 + 0 31 4 + 0 32 4 + 0 33 4>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5"; + }; + + dma1: shdma@fe018020 { + compatible = "renesas,shdma"; + reg = <0xfe018020 0x270>, + <0xfe019000 0xc>; + interrupt-parent = <&gic>; + interrupts = <0 41 4 + 0 35 4 + 0 36 4 + 0 37 4 + 0 38 4 + 0 39 4 + 0 40 4>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5"; + }; + + dma2: shdma@fe028020 { + compatible = "renesas,shdma"; + reg = <0xfe028020 0x270>, + <0xfe029000 0xc>; + interrupt-parent = <&gic>; + interrupts = <0 48 4 + 0 42 4 + 0 43 4 + 0 44 4 + 0 45 4 + 0 46 4 + 0 47 4>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5"; + }; + }; + i2c0: i2c@fff20000 { #address-cells = <1>; #size-cells = <0>; diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 6b3ed42..de55161 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -996,7 +996,19 @@ void __init r8a7740_add_early_devices(void) #ifdef CONFIG_USE_OF +static struct of_dev_auxdata r8a7740_dmac_auxdata[] = { + OF_DEV_AUXDATA("renesas,shdma", 0xfe008020, "sh-dma-engine.0", + &dma_platform_data), + OF_DEV_AUXDATA("renesas,shdma", 0xfe018020, "sh-dma-engine.1", + &dma_platform_data), + OF_DEV_AUXDATA("renesas,shdma", 0xfe028020, "sh-dma-engine.2", + &dma_platform_data), + { } +}; + static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = { + OF_DEV_AUXDATA("renesas,shdma-mux", 0, "shdma-of.0", + r8a7740_dmac_auxdata), { } };