From patchwork Thu Apr 21 15:07:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 66391 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp203803qge; Thu, 21 Apr 2016 08:08:35 -0700 (PDT) X-Received: by 10.66.72.198 with SMTP id f6mr21613506pav.60.1461251314957; Thu, 21 Apr 2016 08:08:34 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t125si1076344pfb.113.2016.04.21.08.08.34; Thu, 21 Apr 2016 08:08:34 -0700 (PDT) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753146AbcDUPH5 (ORCPT + 29 others); Thu, 21 Apr 2016 11:07:57 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36975 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbcDUPH4 (ORCPT ); Thu, 21 Apr 2016 11:07:56 -0400 Received: by mail-wm0-f46.google.com with SMTP id n3so138268607wmn.0 for ; Thu, 21 Apr 2016 08:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GP4tMMh9NSE5oZmEBKmGkvD0vWsdUDadZqOHN7NghZY=; b=V4Se6eTN8anM7jcsXhIBdWwpGDN/PJdi2+1WMjq06W5WDU5Q2c2c6rw8Z7p54XG66u vH1CFUJFAB9cnMYbk27f2y3BqOg0ua01vPgK7BeJ8qDkdVavfX9Xn8ulLeZ/mC7YrcuQ 4/jxqk0dvSIoi7JghWir83u/SnaCv4Mop2vpY= 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=GP4tMMh9NSE5oZmEBKmGkvD0vWsdUDadZqOHN7NghZY=; b=XquT2GFbua99WoXVuAv4WIvV6XyK+nZgOdwlMT125EOGhP7d+kpNIK1xFU1kLH869f x+q1zMXPCYwLmxDHcapprmMX5GV/KyGZ538E/UgIFVR3Iul+X1Iz4QWjXWb72zGSLKgC QrQaeeHQqlP0CSkRf3kUOWcKu+ZBtAnIYip3PzRV6KjIIG0DIr+x6ccxH/X0u0TcmIx0 kvL2fFOkeb4uCX2vgGgQ2sPEvwPPzPER9M+tjf1hIQ3bNWP69A54ccv2PN9uf83nq0dA MHgj3zFfmw8lPqWnj0eDWRMk1pZ1h4I2skmW7wdAp6sLN7b5qkTd0ipQrlINAzE4cQOX WN9Q== X-Gm-Message-State: AOPr4FXwrTHlS5YtkRayv1z0cdqjSB8kg/Gn9DCW+qRKdFEiTj3r77EPVGR4FU/sJVgGYrxR X-Received: by 10.28.125.8 with SMTP id y8mr37511010wmc.87.1461251274632; Thu, 21 Apr 2016 08:07:54 -0700 (PDT) Received: from dell.localdomain (host81-129-172-5.range81-129.btcentralplus.com. [81.129.172.5]) by smtp.gmail.com with ESMTPSA id s6sm3288875wjy.31.2016.04.21.08.07.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Apr 2016 08:07:54 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@stlinux.com, maxime.coquelin@st.com, Lee Jones Subject: [[PATCH v2] 7/8] ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory Date: Thu, 21 Apr 2016 16:07:46 +0100 Message-Id: <1461251267-14897-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1461251267-14897-1-git-send-email-lee.jones@linaro.org> References: <1461251267-14897-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 Signed-off-by: Maxime Coquelin --- arch/arm/boot/dts/stih407-family.dtsi | 47 +++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) -- 2.8.0 diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index 7cd358b..33de7361 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>; @@ -748,9 +778,9 @@ status = "okay"; }; - st231_gp0: remote-processor@40000000 { + st231_gp0: remote-processor { 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>; @@ -758,9 +788,10 @@ st,syscfg = <&syscfg_core 0x22c>; }; - st231_gp1: remote-processor@41000000 { + + st231_gp1: remote-processor { 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>; @@ -768,9 +799,9 @@ st,syscfg = <&syscfg_core 0x220>; }; - st231_audio: remote-processor@42000000 { + st231_audio: remote-processor { 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>; @@ -778,9 +809,9 @@ st,syscfg = <&syscfg_core 0x228>; }; - st231_dmu: remote-processor@43000000 { + st231_dmu: remote-processor { 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>;