From patchwork Tue Nov 24 13:14:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 57230 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2080830lbb; Tue, 24 Nov 2015 05:16:43 -0800 (PST) X-Received: by 10.98.15.68 with SMTP id x65mr22993922pfi.146.1448371002548; Tue, 24 Nov 2015 05:16:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id os9si9298760pab.241.2015.11.24.05.16.42; Tue, 24 Nov 2015 05:16:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753557AbbKXNQh (ORCPT + 28 others); Tue, 24 Nov 2015 08:16:37 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35906 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753467AbbKXNQe (ORCPT ); Tue, 24 Nov 2015 08:16:34 -0500 Received: by wmww144 with SMTP id w144so138119899wmw.1 for ; Tue, 24 Nov 2015 05:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=82tPCanyCeJPhnFzQy9z/bjCEs4xrFgAfigotO1LHEE=; b=fZUFVxjR2kcQX5xBd4HURt9PMIPsA4dc6zlIFQU4mVjawiJu3q5n3kKS1RZVETzcSr 1XVluKhnPdCcupeRIsjDgQQiYppT+Tm4JgY3aKVSpbhMlmC2Eur2w89DQzNqN9AuBLXM j/DNGv4x00oR1RXTDk04e2UYmZ/NRfSxQhuBD46RGXZc59YI9d84Tx3LGI9ipzFFnJyg hTYE2kXl4NeWkpKQ8CC2D3lzn9AY7ulOEZ6/uwFFHMAF4SXm8QxgoX7i0CibiKh4NrQC hrtNJSfrQUcAeOPUk00AKN9e+tvflG68czW6+1V9hPaRPtSUdQh+swHOx13dQMTWewc9 dGDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=82tPCanyCeJPhnFzQy9z/bjCEs4xrFgAfigotO1LHEE=; b=lXcIO9Xmg5QVzohTjVB7GvKOU0eUvjOmkWnLO32GI8C45Z/WpvCrNEYejQxjqE9WHb ChSyZXbteWCPOJV6zktWDpV+0D+ZGLbD6l7x02DWa5jG1tV+f+racl/hC5PhFnwm7mlA Dba5ol95YRv1gJnu0GMGgkPTzDuVSXS7lFlvAbZcIMGJjss1iutIa98t/jXcF6TeqaaS npN2Qpn2iZoN6LLsQP+M9zGk1brWRTvQcYduCDVrwcpSQlbIA55Gn3jOqgoZ4RKlxuIK jqNtmH3H3w3b11ayW+GOnj8K3XCS5JSj1g3LqWPTMuitoySOkWI967nrZgEJH99CeBgG oElQ== X-Gm-Message-State: ALoCoQnldi1BJ7Ny7O/tZolJsryW8NqC709SC+2vV9wog8O1fGsjxgikE6TKxMN0MKD+1rsQDxo/ X-Received: by 10.194.23.73 with SMTP id k9mr27413323wjf.3.1448370993186; Tue, 24 Nov 2015 05:16:33 -0800 (PST) Received: from localhost.localdomain (host86-170-56-3.range86-170.btcentralplus.com. [86.170.56.3]) by smtp.gmail.com with ESMTPSA id f11sm17112172wmd.7.2015.11.24.05.16.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Nov 2015 05:16:32 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@stlinux.com, maxime.coquelin@st.com, ohad@wizery.com, devicetree@vger.kernel.org, Nathan_Lynch@mentor.com, f.fainelli@gmail.com, ludovic.barre@st.com, s-anna@ti.com, Lee Jones Subject: [RESEND v4 6/6] ARM: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory Date: Tue, 24 Nov 2015 13:14:22 +0000 Message-Id: <1448370862-19120-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448370862-19120-1-git-send-email-lee.jones@linaro.org> References: <1448370862-19120-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Doing so saves quite a bit of code in the driver. For more information on the 'reserved-memory' bindings see: Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt Suggested-by: Suman Anna Signed-off-by: Lee Jones --- arch/arm/boot/dts/stih407-family.dtsi | 46 +++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 8 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index 15c20b6..27b8efc 100644 --- a/arch/arm/boot/dts/stih407-family.dtsi +++ b/arch/arm/boot/dts/stih407-family.dtsi @@ -15,6 +15,36 @@ #address-cells = <1>; #size-cells = <1>; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + gp0_reserved: rproc@40000000 { + compatible = "shared-dma-pool"; + reg = <0x40000000 0x01000000>; + no-map; + }; + + gp1_reserved: rproc@41000000 { + compatible = "shared-dma-pool"; + reg = <0x41000000 0x01000000>; + no-map; + }; + + audio_reserved: rproc@42000000 { + compatible = "shared-dma-pool"; + reg = <0x42000000 0x01000000>; + no-map; + }; + + dmu_reserved: rproc@43000000 { + compatible = "shared-dma-pool"; + reg = <0x43000000 0x01000000>; + no-map; + }; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -651,9 +681,9 @@ status = "okay"; }; - st231_gp0: st231-gp0@40000000 { + st231_gp0: st231-gp0 { compatible = "st,st231-rproc"; - reg = <0x40000000 0x01000000>; + memory-region = <&gp0_reserved>; resets = <&softreset STIH407_ST231_GP0_SOFTRESET>; reset-names = "sw_reset"; clocks = <&clk_s_c0_flexgen CLK_ST231_GP_0>; @@ -661,9 +691,9 @@ st,syscfg = <&syscfg_core 0x22c>; }; - st231_gp1: st231-gp1@41000000 { + st231_gp1: st231-gp1 { compatible = "st,st231-rproc"; - reg = <0x41000000 0x01000000>; + memory-region = <&gp1_reserved>; resets = <&softreset STIH407_ST231_GP1_SOFTRESET>; reset-names = "sw_reset"; clocks = <&clk_s_c0_flexgen CLK_ST231_GP_1>; @@ -671,9 +701,9 @@ st,syscfg = <&syscfg_core 0x220>; }; - st231_audio: st231-audio@42000000 { + st231_audio: st231-audio { compatible = "st,st231-rproc"; - reg = <0x42000000 0x01000000>; + memory-region = <&audio_reserved>; resets = <&softreset STIH407_ST231_AUD_SOFTRESET>; reset-names = "sw_reset"; clocks = <&clk_s_c0_flexgen CLK_ST231_AUD_0>; @@ -681,9 +711,9 @@ st,syscfg = <&syscfg_core 0x228>; }; - st231_dmu: st231-dmu@43000000 { + st231_dmu: st231-dmu { compatible = "st,st231-rproc"; - reg = <0x43000000 0x01000000>; + memory-region = <&dmu_reserved>; resets = <&softreset STIH407_ST231_DMU_SOFTRESET>; reset-names = "sw_reset"; clocks = <&clk_s_c0_flexgen CLK_ST231_DMU>;