Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6792209imm; Tue, 24 Jul 2018 03:11:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfX7ZelQ3FqJTvLh6nU5QsKdEQZvtyjjwqfRyusX9xUWfdwXzPxbO6C7SYzQ6QQJumcVKM5 X-Received: by 2002:a63:fc0a:: with SMTP id j10-v6mr15641255pgi.1.1532427101611; Tue, 24 Jul 2018 03:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532427101; cv=none; d=google.com; s=arc-20160816; b=0aftIbY9JpZF0/p6a5ifuyoQeNADvhaZaonjIvooP0vv5BLjvtGGAZTKGql1s1yEqr SOXdmxWn4zmxDMFFlJeoz2IjRME0iGMUSF93s9a1cGn+R/m8VOQLBvr3UdPvsSXJ3gAM 4hDPg0qPjXnKlW0AX8ncDvQDC6numqfNegRattPZPwKhEqdJ/5BWY68MmMfDBE/6erH3 EVt/ALsyCfOabrurVzCAanG3AA5iMfTY2dCMY6GRumULAK8sYq2RBqh211wll9Qm1cp3 01D7VakJY66YdnNch0n/vAmQIKrVOB4+O8u+mtK/xy+ylBaV6l2nBWSaT1Jqle7IAbRI NUiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=S27fINJzlAmiOvJVdQml8Ue0Jw8Yx3Lvjg8w/ZBhGLU=; b=j7nvEwA+BmF82z2YVSaYc/xZl2LdN9npBCOSo8fUgICg/mlzskp5vRhWFcXDD87xN6 SWyP4AiDjxH04riHyFsgcd3JYWM1elkpz5DZh37tZqTaR+h8SAS1qih+VCtHwbUEZPj4 VVU7F5jvbRs/qlaRofuxVq2s37d20iJZtxSdlrDEraQOiFMtSxm2M3KtrUgka6pElBQZ tqAl3/7gn+erm75v0IkkPgawU0XTlpNF7+/myHiJMG2r15Jsw2HBKwnOzr8v2fLZqZL0 W+qBNmIoQzon/MP8arRXjBGpF9ph0P4H+7Vg4dZtqTasl6RJG0iHmpkDEX0CnUZwn2sj Xttw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=iuogC3WM; 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 sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o123-v6si12669076pfg.5.2018.07.24.03.11.26; Tue, 24 Jul 2018 03:11:41 -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=@synopsys.com header.s=mail header.b=iuogC3WM; 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 sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388420AbeGXLQW (ORCPT + 99 others); Tue, 24 Jul 2018 07:16:22 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:40126 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388251AbeGXLQV (ORCPT ); Tue, 24 Jul 2018 07:16:21 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id DDF4310C0D29; Tue, 24 Jul 2018 03:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1532427037; bh=e4GsGnW/sVaeXT8ks/i29v3MNLKITuDh+vXhs0xFl50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iuogC3WMQk4lI47gWASQqKPMMP9XfeXsaTY8kCnEJijkxeeT5OWFjTHjK3pnxLYEg JSbwp9OgeFhChxmVG8bFogJCJU7kbQgTaVlieXMzFOnUz2n4rnCCyEhFzpvIK1+JKV +RxHW8RR2OJIN/kei1PkxAkrIoDVLPlp2Rvp8He58HF/P07x8Q1GKbEU68FSe9llux Kkgq1klDH6bkkhVaGZZG33LvedWjKP1FrApbxXPkemWcEZajhxxSC5BNLMuK+oK5lK MXt7HLwsCbCTz1mYiKMpS//Xr5GE6eSPTB1t1atoYfH+oxY7vZXZ7XywlQ/aPBeFYe qBLzqSKrkMCow== Received: from paltsev-e7480.internal.synopsys.com (unknown [10.121.8.86]) by mailhost.synopsys.com (Postfix) with ESMTP id 266493325; Tue, 24 Jul 2018 03:10:35 -0700 (PDT) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Vineet Gupta , Alexey Brodkin , hch@lst.de, Eugeniy Paltsev Subject: [PATCH 1/4] ARC: DTS: mark DMA devices connected through IOC port as dma-coherent Date: Tue, 24 Jul 2018 13:09:58 +0300 Message-Id: <20180724101001.31965-2-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180724101001.31965-1-Eugeniy.Paltsev@synopsys.com> References: <20180724101001.31965-1-Eugeniy.Paltsev@synopsys.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mark DMA devices on AXS103 and HSDK boards connected through IOC port as dma-coherent. Signed-off-by: Eugeniy Paltsev --- arch/arc/boot/dts/axc003.dtsi | 26 ++++++++++++++++++++++++++ arch/arc/boot/dts/axc003_idu.dtsi | 26 ++++++++++++++++++++++++++ arch/arc/boot/dts/hsdk.dts | 4 ++++ 3 files changed, 56 insertions(+) diff --git a/arch/arc/boot/dts/axc003.dtsi b/arch/arc/boot/dts/axc003.dtsi index dc91c663bcc0..d75d65ddf8e3 100644 --- a/arch/arc/boot/dts/axc003.dtsi +++ b/arch/arc/boot/dts/axc003.dtsi @@ -93,6 +93,32 @@ }; }; + /* + * Mark DMA peripherals connected via IOC port as dma-coherent. We do + * it via overlay because peripherals defined in axs10x_mb.dtsi are + * used for both AXS101 and AXS103 boards and only AXS103 has IOC (so + * only AXS103 board has HW-coherent DMA peripherals) + * We don't need to mark pgu@17000 as dma-coherent because it uses + * external DMA buffer located outside of IOC aperture. + */ + axs10x_mb { + ethernet@0x18000 { + dma-coherent; + }; + + ehci@0x40000 { + dma-coherent; + }; + + ohci@0x60000 { + dma-coherent; + }; + + mmc@0x15000 { + dma-coherent; + }; + }; + /* * The DW APB ICTL intc on MB is connected to CPU intc via a * DT "invisible" DW APB GPIO block, configured to simply pass thru diff --git a/arch/arc/boot/dts/axc003_idu.dtsi b/arch/arc/boot/dts/axc003_idu.dtsi index 69ff4895f2ba..a05bb737ea63 100644 --- a/arch/arc/boot/dts/axc003_idu.dtsi +++ b/arch/arc/boot/dts/axc003_idu.dtsi @@ -100,6 +100,32 @@ }; }; + /* + * Mark DMA peripherals connected via IOC port as dma-coherent. We do + * it via overlay because peripherals defined in axs10x_mb.dtsi are + * used for both AXS101 and AXS103 boards and only AXS103 has IOC (so + * only AXS103 board has HW-coherent DMA peripherals) + * We don't need to mark pgu@17000 as dma-coherent because it uses + * external DMA buffer located outside of IOC aperture. + */ + axs10x_mb { + ethernet@0x18000 { + dma-coherent; + }; + + ehci@0x40000 { + dma-coherent; + }; + + ohci@0x60000 { + dma-coherent; + }; + + mmc@0x15000 { + dma-coherent; + }; + }; + /* * This INTC is actually connected to DW APB GPIO * which acts as a wire between MB INTC and CPU INTC. diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts index 006aa3de5348..ebb686c21393 100644 --- a/arch/arc/boot/dts/hsdk.dts +++ b/arch/arc/boot/dts/hsdk.dts @@ -176,6 +176,7 @@ phy-handle = <&phy0>; resets = <&cgu_rst HSDK_ETH_RESET>; reset-names = "stmmaceth"; + dma-coherent; mdio { #address-cells = <1>; @@ -194,12 +195,14 @@ compatible = "snps,hsdk-v1.0-ohci", "generic-ohci"; reg = <0x60000 0x100>; interrupts = <15>; + dma-coherent; }; ehci@40000 { compatible = "snps,hsdk-v1.0-ehci", "generic-ehci"; reg = <0x40000 0x100>; interrupts = <15>; + dma-coherent; }; mmc@a000 { @@ -212,6 +215,7 @@ clock-names = "biu", "ciu"; interrupts = <12>; bus-width = <4>; + dma-coherent; }; }; -- 2.14.4