From patchwork Fri Jun 20 15:04:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 32286 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2B682203F4 for ; Fri, 20 Jun 2014 15:06:05 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id uo5sf13317194pbc.8 for ; Fri, 20 Jun 2014 08:06:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=tJYkkn9cCF6ydkFbFf3mHUfFXruiwzWyNCNr3//tAeQ=; b=j3Ow7VWJJt9LthtM07sW0ZOsnkqSWRz+PAFCTuYj7CWx7E5FPR3cw9WhvOdhv9A9LY 89/o8VlkOh6eq+8tZo2k0W8m8NWa8GMeaVI2K5NXf0PBYA45dowQ3346IuAKxp+XhRED fPmvtOYuA9/ZwyTf9OhQ6r3q7lkAAPeChdShZ5ekgo5l0lvmx2JcdZIKDUc63q66qyHX JrYzv8PJDBIHiTD0aVfdkHSp+IYR3WSBvTAacNLz/JQUuwJYw1fihrXnT+NeRsq0Qh+8 STj1/CsIJoQom9kZ4PCvtBMu8aFTwfbWsR6bsedfcYFRKcwXOIwaQTb4Lzn1kikeY65Y q0GA== X-Gm-Message-State: ALoCoQkQnI8kHyE3B2TTmHteZF06ohJAjFwfnPjNXzo7GgchPGt0sjzPDMXmOC6Nqca7lqr/rjxw X-Received: by 10.66.222.9 with SMTP id qi9mr1603168pac.28.1403276764485; Fri, 20 Jun 2014 08:06:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.35.199 with SMTP id n65ls982761qgn.59.gmail; Fri, 20 Jun 2014 08:06:04 -0700 (PDT) X-Received: by 10.52.243.225 with SMTP id xb1mr2979746vdc.36.1403276764372; Fri, 20 Jun 2014 08:06:04 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id ut8si4219994vec.4.2014.06.20.08.06.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Jun 2014 08:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.181 as permitted sender) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id db11so3645779veb.40 for ; Fri, 20 Jun 2014 08:06:04 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr706808vcf.71.1403276764180; Fri, 20 Jun 2014 08:06:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp29109vcb; Fri, 20 Jun 2014 08:06:03 -0700 (PDT) X-Received: by 10.68.139.36 with SMTP id qv4mr5493376pbb.82.1403276762865; Fri, 20 Jun 2014 08:06:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qa15si10174576pab.217.2014.06.20.08.06.02; Fri, 20 Jun 2014 08:06:02 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965831AbaFTPFu (ORCPT + 13 others); Fri, 20 Jun 2014 11:05:50 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:58045 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965663AbaFTPFQ (ORCPT ); Fri, 20 Jun 2014 11:05:16 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5KF4NG1015744; Fri, 20 Jun 2014 10:04:23 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5KF4NwS009906; Fri, 20 Jun 2014 10:04:23 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Fri, 20 Jun 2014 10:04:22 -0500 Received: from [158.218.103.31] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5KF4KFk030130; Fri, 20 Jun 2014 10:04:20 -0500 Message-ID: <53A44D73.6080200@ti.com> Date: Fri, 20 Jun 2014 11:04:19 -0400 From: Santosh Shilimkar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Rob Herring CC: Fabio Estevam , linux-kernel , Mark Rutland , "devicetree@vger.kernel.org" , , Russell King , Pawel Moll , Arnd Bergmann , Ian Campbell , Shawn Guo , Kumar Gala , Grant Likely , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] dt/documentation: add specification of dma bus information References: <1401981720-6946-1-git-send-email-santosh.shilimkar@ti.com> <5395BDA7.3060507@ti.com> In-Reply-To: <5395BDA7.3060507@ti.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: santosh.shilimkar@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote: > On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote: >> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar >> wrote: >>> Recently we introduced the generic device tree infrastructure for couple of DMA >>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that >>> its useful for future users. >>> >>> The "dma-ranges" property is intended to be used for describing the >>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses. >>> >>> The "dma-coherent" property is intended to be used for identifying devices >>> supported coherent DMA operations. >>> >>> Cc: Arnd Bergmann >>> Cc: Grant Likely >>> Cc: Rob Herring >>> Cc: Pawel Moll >>> Cc: Mark Rutland >>> Cc: Ian Campbell >>> Cc: Shawn Guo >>> Cc: Kumar Gala >>> Signed-off-by: Grygorii Strashko >>> Signed-off-by: Santosh Shilimkar >>> --- >>> Documentation/devicetree/booting-without-of.txt | 60 +++++++++++++++++++++++ >>> 1 file changed, 60 insertions(+) >>> >>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt >>> index 1f013bd..f0120c1 100644 >>> --- a/Documentation/devicetree/booting-without-of.txt >>> +++ b/Documentation/devicetree/booting-without-of.txt >>> @@ -51,6 +51,8 @@ Table of Contents >>> >>> VIII - Specifying device power management information (sleep property) >>> >>> + VIV - Specifying dma bus information >> >> "9" in Roman numeral is "IX" >> > Yeah.. Not sure what I was thinking... > Updated patch end of the email with the typo fixed. Rob, Can you please pick this up if you are ok with the it. Regards, Santosh >From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Fri, 20 Jun 2014 11:01:54 -0400 Subject: [PATCH] dt/documentation: add specification of dma bus information Recently we introduced the generic device tree infrastructure for couple of DMA bus parameter, dma-ranges and dma-coherent. Update the documentation so that its useful for future users. The "dma-ranges" property is intended to be used for describing the configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses. The "dma-coherent" property is intended to be used for identifying devices supported coherent DMA operations. Cc: Arnd Bergmann Cc: Grant Likely Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Acked-by: Shawn Guo Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar --- Documentation/devicetree/booting-without-of.txt | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt index 1f013bd..0b0928c 100644 --- a/Documentation/devicetree/booting-without-of.txt +++ b/Documentation/devicetree/booting-without-of.txt @@ -51,6 +51,8 @@ Table of Contents VIII - Specifying device power management information (sleep property) + IX - Specifying dma bus information + Appendix A - Sample SOC node for MPC8540 @@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller (similar to an interrupt nexus, except that defining a standardized sleep-map should wait until its necessity is demonstrated). +IX - Specifying dma bus information + +Some devices may have DMA memory range shifted relatively to the beginning of +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC +worked in LPAE mode with 4G memory has: +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF] +- DMA range: [ 0x8000 0000, 0xFFFF FFFF] +and DMA range is aliased into first 2G of RAM in HW. + +In such cases, DMA addresses translation should be performed between CPU phys +and DMA addresses. The "dma-ranges" property is intended to be used +for describing the configuration of such system in DT. + +In addition, each DMA master device on the DMA bus may or may not support +coherent DMA operations. The "dma-coherent" property is intended to be used +for identifying devices supported coherent DMA operations in DT. + +* DMA Bus master +Optional property: +- dma-ranges: encoded as arbitrary number of triplets of + (child-bus-address, parent-bus-address, length). Each triplet specified + describes a contiguous DMA address range. + The dma-ranges property is used to describe the direct memory access (DMA) + structure of a memory-mapped bus whose device tree parent can be accessed + from DMA operations originating from the bus. It provides a means of + defining a mapping or translation between the physical address space of + the bus and the physical address space of the parent of the bus. + (for more information see ePAPR specification) + +* DMA Bus child +Optional property: +- dma-ranges: value. if present - It means that DMA addresses + translation has to be enabled for this device. +- dma-coherent: Present if dma operations are coherent + +Example: +soc { + compatible = "ti,keystone","simple-bus"; + ranges = <0x0 0x0 0x0 0xc0000000>; + dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>; + + [...] + + usb: usb@2680000 { + compatible = "ti,keystone-dwc3"; + + [...] + + dma-coherent; + dma-ranges; + + dwc3@2690000 { + compatible = "synopsys,dwc3"; + [...] + }; + }; +}; + Appendix A - Sample SOC node for MPC8540 ========================================