From patchwork Wed Jun 26 14:40:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2785581 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 CBF61C0AB1 for ; Wed, 26 Jun 2013 14:41:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 992A32055A for ; Wed, 26 Jun 2013 14:41:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6323A2055D for ; Wed, 26 Jun 2013 14:41:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752168Ab3FZOlP (ORCPT ); Wed, 26 Jun 2013 10:41:15 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:59400 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752618Ab3FZOlL (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 0LehC6-1UU0KV37ug-00pxBi; 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 32C1640BB4; Wed, 26 Jun 2013 16:40:57 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1Urqu0-0002aw-RS; Wed, 26 Jun 2013 16:40:56 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH/RFC v3 2/7] ARM: shmobile: sh73a0: add support for the DMA0 controller in DT Date: Wed, 26 Jun 2013 16:40:51 +0200 Message-Id: <1372257656-9944-3-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:mrUdD7iDzIziQkrvS+ynQqBPGEst8j/o2LjzQQ6L4Yc xirPaLYPp6yosw7xIPHrkaM7KcfhhpifYwIE+rlzyN4wi62q1/ /FRESkgVgcSb5KHjG1eKQ+U2e+kGKWAXcLMaiDJTgLc8fpFFm+ HznDSX7hm7T0HVdMbAHnnfrma0Eaj+h65ycvAOWmEKsSlztVPU 5ycXxtKg5vpqf79FMYHI5PXiRdFAZhirNYFMPM55vwL2qML7/d UY/XTGFV78YZuzV757f+KlfBcVVXWV35K7A1XA5iznuLBF3X79 KSUb7k+BdYsJtRIGBzh7awLbQGbrIVPl+taCKSockTO66FSeWj uEaVXZl0cGSOHo5PSRsMwbXsoLcvwOPMotp6Dqg84CKoLbFb8O OJLAjZq5lZt8w== 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 Add a Device Tree node for the DMA0 controller on sh73a0 and auxdata to supply platform data to the driver. To enable the DMA0 controller it also has to be taken out of reset. Signed-off-by: Guennadi Liakhovetski --- arch/arm/boot/dts/sh73a0.dtsi | 36 +++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-sh73a0.c | 4 +++ 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index b977502..e730246 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi @@ -119,6 +119,42 @@ 0 32 0x4>; }; + dma0: shdma@fe000020 { + compatible = "renesas,shdma"; + reg = <0xfe000020 0x89e0>; + interrupt-parent = <&gic>; + interrupts = <0 129 4 + 0 109 4 + 0 110 4 + 0 111 4 + 0 112 4 + 0 113 4 + 0 114 4 + 0 115 4 + 0 116 4 + 0 117 4 + 0 118 4 + 0 119 4 + 0 120 4 + 0 121 4 + 0 122 4 + 0 123 4 + 0 124 4 + 0 125 4 + 0 126 4 + 0 127 4 + 0 128 4>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12", "ch13", "ch14", "ch15", + "ch16", "ch17", "ch18", "ch19"; + #dma-cells = <1>; + dma-channels = <20>; + dma-requests = <256>; + }; + i2c0: i2c@e6820000 { #address-cells = <1>; #size-cells = <0>; diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 96e7ca1e..f95ecc7 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -959,6 +959,7 @@ void __init sh73a0_add_early_devices(void) #ifdef CONFIG_USE_OF static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = { + OF_DEV_AUXDATA("renesas,shdma", 0xfe000020, "sh-dma-engine.0", &sh73a0_dmae_platform_data), {}, }; @@ -969,6 +970,9 @@ void __init sh73a0_add_standard_devices_dt(void) /* clocks are setup late during boot in the case of DT */ sh73a0_clock_init(); + /* Clear software reset bit on SY-DMAC module */ + __raw_writel(__raw_readl(SRCR2) & ~(1 << 18), SRCR2); + platform_add_devices(sh73a0_devices_dt, ARRAY_SIZE(sh73a0_devices_dt)); of_platform_populate(NULL, of_default_bus_match_table,