From patchwork Tue Jan 12 12:46:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 59608 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2715589lbb; Tue, 12 Jan 2016 04:47:56 -0800 (PST) X-Received: by 10.66.162.164 with SMTP id yb4mr5292532pab.94.1452602876844; Tue, 12 Jan 2016 04:47:56 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9si2221015par.42.2016.01.12.04.47.56; Tue, 12 Jan 2016 04:47:56 -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=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965132AbcALMro (ORCPT + 29 others); Tue, 12 Jan 2016 07:47:44 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:34732 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934884AbcALMrj (ORCPT ); Tue, 12 Jan 2016 07:47:39 -0500 Received: by mail-wm0-f48.google.com with SMTP id u188so254328018wmu.1 for ; Tue, 12 Jan 2016 04:47:38 -0800 (PST) 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=82tPCanyCeJPhnFzQy9z/bjCEs4xrFgAfigotO1LHEE=; b=G65cC557m1V5EtOtjC8km3+orc4MlSN6oer0G8xWxIWGEPVMlCLxxh6cQJPetsGNft nhW4kbdUDk0SR1gC/qrYzTZnHHMlYU0bUcUpe9cSmOxpjMxLYnc9AXwgf708fAkZHZ+b qyNJViwB2G9Ucqk1g7+mHu88/i5DB1xaaQv4k= 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=godpiujA6Bo4LBO4syRvWX7ygVfHnDhzC/wBVxhk0A6Totx9tGng4Ga9T7/Q0OroNn RC6tIjBI0H6HWAgACYvYUtCNRz6f81SQqW4gXMi7ICi7k0n/p9cGZ0HYUBa0D6wUJZ5g 9SYhXar531W5J/hGv4bNrzi9rINqnFOxhm9FszQzT1RbuCH1EH8WOIIlvu0/mDQlavXA j09hEnJqdZucOtoZvuWecxCJ1RZFS/gRgiZ+frTmjJ7eXvGdrdLmdeJrLiQib3NP0Cdr XMeIIZ5eN61VMuf+0h6nlMCgX7F6gKSUgN3gvwEVk6Cjo2do3Iwm0faT0jnHQj9aLzzF EiFQ== X-Gm-Message-State: ALoCoQlKLXNTtKsZEQtONcFlDXPpxW/0/Yn4vgoTIODT4+moph7Cuk/akwTFApEiSzRIuXMw7i5xAlzw/Q0NTqKiQ50GMXA+1A== X-Received: by 10.28.136.148 with SMTP id k142mr20242911wmd.41.1452602858293; Tue, 12 Jan 2016 04:47:38 -0800 (PST) Received: from localhost.localdomain ([217.46.108.250]) by smtp.gmail.com with ESMTPSA id uo9sm30240142wjc.49.2016.01.12.04.47.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 04:47:37 -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: [PATCH v5 7/7] ARM: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory Date: Tue, 12 Jan 2016 12:46:21 +0000 Message-Id: <1452602781-22424-8-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452602781-22424-1-git-send-email-lee.jones@linaro.org> References: <1452602781-22424-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 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>;