Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2649688ybk; Tue, 12 May 2020 04:54:12 -0700 (PDT) X-Google-Smtp-Source: APiQypI1IJtzzJrkRzmp0JqaPq11c6nTdks1nJPp+DtBh79nBxi4kL1t7l+Klri+b/cO8wqHcwiN X-Received: by 2002:a17:906:4e8a:: with SMTP id v10mr16906985eju.63.1589284451846; Tue, 12 May 2020 04:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589284451; cv=none; d=google.com; s=arc-20160816; b=IIfRCMYCIb/FKD5vE6gOg+j6WV6f+l84k6RjiNHT2KyDN+5vJwVhf2M7wPFxwLU4G7 rXtiFG/w3jyXCS9w2AEBYg3bXyP5icvHKKKcRmDe6SOpMTr25Rg4jXHl+6UIfOUu1K5s MiifBejW8GMeDSL1rWEPcSD4XA620txLJ4d4/Qk53W1WOrmNCNmf+lFAWSNSjbBa0mvb evMEvNn7KDBcXcIinExahzuY7OHG6yqxak46lOdVn9nMBQ01OhzOzqj2ykeGI5XvuVfW HxLQsXOOLX9kUGoKAOTtxOsmS9TjjpoADPipneebISTTjkcdV5J6UHIukCyiWlllckAs RAsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VNLTrgBiuwYy7v7R7LuttKZoRt5Vlc6NUmF8J7rrHEM=; b=EgTwdx1A0stCIGEVuSNOsQ84vlVesq2q0G4fuY87/9Y29DdKvTcVw+tm1KRuG1ZWyV +Ov059hdDXOHXSD6HQfmrwfO9yIvbeJ9KIRLddCpiFIUiSbBDe6u9dmcsBvOtnlF0PhA pUfHDT2KR2LbYhO0JwYjfHClA5OHSmOUX1WH50CYXmSOaTZbHMfjHnGROUXtNUNBcKMR UE86l+abyBxCJAb2JtKzlWPwDmt9XB8NCzwvu5zdt0CuqHI4epl7KsHc3clcEDEjzG0b gZiwSO2Mly88iww6/cOjuC8y6T46v/Ue/Na7ZQSHjlIlFjmNNJgqolZRPbAIW9Z67ETw dOlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si7692844edi.386.2020.05.12.04.53.48; Tue, 12 May 2020 04:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729707AbgELLt7 (ORCPT + 99 others); Tue, 12 May 2020 07:49:59 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:53002 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729700AbgELLt4 (ORCPT ); Tue, 12 May 2020 07:49:56 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id 8E42E803080B; Tue, 12 May 2020 11:49:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X9U0mGSQWcVy; Tue, 12 May 2020 14:49:47 +0300 (MSK) Date: Tue, 12 May 2020 14:49:46 +0300 From: Serge Semin To: Andy Shevchenko CC: Serge Semin , Vinod Koul , Viresh Kumar , Rob Herring , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Dan Williams , , , , Subject: Re: [PATCH v2 2/6] dt-bindings: dma: dw: Add max burst transaction length property Message-ID: <20200512114946.x777yb6bhe22ccn5@mobilestation> References: <20200306131048.ADBE18030797@mail.baikalelectronics.ru> <20200508105304.14065-1-Sergey.Semin@baikalelectronics.ru> <20200508105304.14065-3-Sergey.Semin@baikalelectronics.ru> <20200508111242.GH185537@smile.fi.intel.com> <20200511200528.nfkc2zkh3bvupn7l@mobilestation> <20200511210138.GN185537@smile.fi.intel.com> <20200511213531.wnywlljiulvndx6s@mobilestation> <20200512090804.GR185537@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200512090804.GR185537@smile.fi.intel.com> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2020 at 12:08:04PM +0300, Andy Shevchenko wrote: > On Tue, May 12, 2020 at 12:35:31AM +0300, Serge Semin wrote: > > On Tue, May 12, 2020 at 12:01:38AM +0300, Andy Shevchenko wrote: > > > On Mon, May 11, 2020 at 11:05:28PM +0300, Serge Semin wrote: > > > > On Fri, May 08, 2020 at 02:12:42PM +0300, Andy Shevchenko wrote: > > > > > On Fri, May 08, 2020 at 01:53:00PM +0300, Serge Semin wrote: > > > > > > This array property is used to indicate the maximum burst transaction > > > > > > length supported by each DMA channel. > > > > > > > > > > > + snps,max-burst-len: > > > > > > + $ref: /schemas/types.yaml#/definitions/uint32-array > > > > > > + description: | > > > > > > + Maximum length of burst transactions supported by hardware. > > > > > > + It's an array property with one cell per channel in units of > > > > > > + CTLx register SRC_TR_WIDTH/DST_TR_WIDTH (data-width) field. > > > > > > + items: > > > > > > + maxItems: 8 > > > > > > + items: > > > > > > > > > > > + enum: [4, 8, 16, 32, 64, 128, 256] > > > > > > > > > > Isn't 1 allowed? > > > > > > > > Burst length of 1 unit is supported, but in accordance with Data Book the MAX > > > > burst length is limited to be equal to a value from the set I submitted. So the > > > > max value can be either 4, or 8, or 16 and so on. > > > > > > Hmm... It seems you mistakenly took here DMAH_CHx_MAX_MULT_SIZE pre-silicon > > > configuration parameter instead of runtime as described in Table 26: > > > CTLx.SRC_MSIZE and DEST_MSIZE Decoding. > > > > No. You misunderstood what I meant. We shouldn't use a runtime parameters values > > here. Why would we? > > Because what we describe in the DTS is what user may do to the hardware. In > some cases user might want to limit this to 1, how to achieve that? No, dts isn't about hardware configuration, it's about hardware description. It's not what user want, it's about what hardware can and can't. If a developer wants to limit it to 1, one need to do this in software. The IP-core just can't be synthesized with such limitation. No matter what, it must be no less than 4 as I described in the enum setting. > > Rob, is there any clarification that schema describes only synthesized values? > Or i.o.w. shall we allow user to setup whatever hardware supports at run time? One more time. max-burst-len set to 1 wouldn't describe the real hardware capability because the Dw DMAC IP-core simply can't be synthesized with such max-burst-len. In this patch I submitted the "max-burst-len" property, not just "burst-len" setting. > > > Property "snps,max-burst-len" matches DMAH_CHx_MAX_MULT_SIZE > > config parameter. > > Why? User should have a possibility to ask whatever hardware supports at run time. Because the run time parameter is limited with DMAH_CHx_MAX_MULT_SIZE value, you agreed with that further and "snps,max-burst-len" is about hardware limitation. For the same reason the dma-channels property is limited to belong the segment 1 - 8, dma-masters number must be limited with 1 - 4, block_size should be one of the set [3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095] and so on. For instance, the block-size can be set any but not greater than a value of the "block-size" property found in the dt node or retrieved from the corresponding IP param register. It's not what user want, but what hardware can support. -Sergey > > > See a comment to the "SRC_MSIZE" and "DEST_MSIZE" fields of the > > registers. You'll find out that their maximum value is determined by the > > DMAH_CHx_MAX_MULT_SIZE parameter, which must belong to the set [4, 8, 16, 32, 64, > > 128, 256]. So no matter how you synthesize the DW DMAC block you'll have at least > > 4x max burst length supported. > > That's true. > > > -- > With Best Regards, > Andy Shevchenko > >