From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932239AbcAYKg2 (ORCPT ); Mon, 25 Jan 2016 05:36:28 -0500 Received: from mga03.intel.com ([134.134.136.65]:19647 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932142AbcAYKgY (ORCPT ); Mon, 25 Jan 2016 05:36:24 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,343,1449561600"; d="scan'208";a="641000417" Message-ID: <1453718210.2521.219.camel@linux.intel.com> Subject: Re: [PATCH 07/15] dmaengine: dw: revisit data_width property From: Andy Shevchenko To: =?ISO-8859-1?Q?M=E5ns_Rullg=E5rd?= Cc: Vineet Gupta , Viresh Kumar , Vinod Koul , "linux-kernel@vger.kernel.org" , "dmaengine@vger.kernel.org" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Dan Williams , "devicetree@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" Date: Mon, 25 Jan 2016 12:36:50 +0200 In-Reply-To: References: <1453663322-14474-1-git-send-email-mans@mansr.com> <1453663322-14474-8-git-send-email-mans@mansr.com> <1453711547.2521.209.camel@linux.intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-01-25 at 10:31 +0000, Måns Rullgård wrote: > Andy Shevchenko writes: > > > On Mon, 2016-01-25 at 07:32 +0000, Vineet Gupta wrote: > > > On Monday 25 January 2016 12:55 AM, Mans Rullgard wrote: > > > > --- a/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > @@ -13,8 +13,7 @@ Required properties: > > > >  - chan_priority: priority of channels. 0 (default): increase > > > > from > > > > chan 0->n, 1: > > > >    increase from chan n->0 > > > >  - block_size: Maximum block size supported by the controller > > > > -- data_width: Maximum data width supported by hardware per AHB > > > > master > > > > -  (0 - 8bits, 1 - 16bits, ..., 5 - 256bits) > > > > +- data-width: Maximum data width supported by hardware (in > > > > bytes) > > > > > > To the reader this suggests a value truely byte granular, but > > > code > > > uses ffs > > > implying that it is still power of 2. > > > Can you mention this here (....in bytes, always power of 2). > > > > While this comment is good, I have still note that using non-power > > of 2 > > values will not break anything. Least power of two number will be > > used > > in that case. So, means I would suggest to replace 'always' by > > 'better > > to be' or something like that. > > Although the code rounds down, the hardware actually works in powers > of > two, and it's better to document this. Let's do "(in bytes, power of 2)" then? -- Andy Shevchenko Intel Finland Oy From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH 07/15] dmaengine: dw: revisit data_width property Date: Mon, 25 Jan 2016 12:36:50 +0200 Message-ID: <1453718210.2521.219.camel@linux.intel.com> References: <1453663322-14474-1-git-send-email-mans@mansr.com> <1453663322-14474-8-git-send-email-mans@mansr.com> <1453711547.2521.209.camel@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?ISO-8859-1?Q?M=E5ns_Rullg=E5rd?= Cc: Vineet Gupta , Viresh Kumar , Vinod Koul , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Dan Williams , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: devicetree@vger.kernel.org On Mon, 2016-01-25 at 10:31 +0000, M=C3=A5ns Rullg=C3=A5rd wrote: > Andy Shevchenko writes: >=20 > > On Mon, 2016-01-25 at 07:32 +0000, Vineet Gupta wrote: > > > On Monday 25 January 2016 12:55 AM, Mans Rullgard wrote: > > > > --- a/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > @@ -13,8 +13,7 @@ Required properties: > > > > =C2=A0- chan_priority: priority of channels. 0 (default): incre= ase > > > > from > > > > chan 0->n, 1: > > > > =C2=A0=C2=A0=C2=A0increase from chan n->0 > > > > =C2=A0- block_size: Maximum block size supported by the control= ler > > > > -- data_width: Maximum data width supported by hardware per AHB > > > > master > > > > -=C2=A0=C2=A0(0 - 8bits, 1 - 16bits, ..., 5 - 256bits) > > > > +- data-width: Maximum data width supported by hardware (in > > > > bytes) > > >=20 > > > To the reader this suggests a value truely byte granular, but > > > code > > > uses ffs > > > implying that it is still power of 2. > > > Can you mention this here (....in bytes, always power of 2). > >=20 > > While this comment is good, I have still note that using non-power > > of 2 > > values will not break anything. Least power of two number will be > > used > > in that case. So, means I would suggest to replace 'always' by > > 'better > > to be' or something like that. >=20 > Although the code rounds down, the hardware actually works in powers > of > two, and it's better to document this. Let's do "(in bytes, power of 2)" then? --=20 Andy Shevchenko Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: andriy.shevchenko@linux.intel.com (Andy Shevchenko) Date: Mon, 25 Jan 2016 12:36:50 +0200 Subject: [PATCH 07/15] dmaengine: dw: revisit data_width property In-Reply-To: References: <1453663322-14474-1-git-send-email-mans@mansr.com> <1453663322-14474-8-git-send-email-mans@mansr.com> <1453711547.2521.209.camel@linux.intel.com> List-ID: Message-ID: <1453718210.2521.219.camel@linux.intel.com> To: linux-snps-arc@lists.infradead.org On Mon, 2016-01-25@10:31 +0000, M?ns Rullg?rd wrote: > Andy Shevchenko writes: > > > On Mon, 2016-01-25@07:32 +0000, Vineet Gupta wrote: > > > On Monday 25 January 2016 12:55 AM, Mans Rullgard wrote: > > > > --- a/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > @@ -13,8 +13,7 @@ Required properties: > > > > ?- chan_priority: priority of channels. 0 (default): increase > > > > from > > > > chan 0->n, 1: > > > > ???increase from chan n->0 > > > > ?- block_size: Maximum block size supported by the controller > > > > -- data_width: Maximum data width supported by hardware per AHB > > > > master > > > > -??(0 - 8bits, 1 - 16bits, ..., 5 - 256bits) > > > > +- data-width: Maximum data width supported by hardware (in > > > > bytes) > > > > > > To the reader this suggests a value truely byte granular, but > > > code > > > uses ffs > > > implying that it is still power of 2. > > > Can you mention this here (....in bytes, always power of 2). > > > > While this comment is good, I have still note that using non-power > > of 2 > > values will not break anything. Least power of two number will be > > used > > in that case. So, means I would suggest to replace 'always' by > > 'better > > to be' or something like that. > > Although the code rounds down, the hardware actually works in powers > of > two, and it's better to document this. Let's do "(in bytes, power of 2)" then? -- Andy Shevchenko Intel Finland Oy From mboxrd@z Thu Jan 1 00:00:00 1970 From: andriy.shevchenko@linux.intel.com (Andy Shevchenko) Date: Mon, 25 Jan 2016 12:36:50 +0200 Subject: [PATCH 07/15] dmaengine: dw: revisit data_width property In-Reply-To: References: <1453663322-14474-1-git-send-email-mans@mansr.com> <1453663322-14474-8-git-send-email-mans@mansr.com> <1453711547.2521.209.camel@linux.intel.com> Message-ID: <1453718210.2521.219.camel@linux.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, 2016-01-25 at 10:31 +0000, M?ns Rullg?rd wrote: > Andy Shevchenko writes: > > > On Mon, 2016-01-25 at 07:32 +0000, Vineet Gupta wrote: > > > On Monday 25 January 2016 12:55 AM, Mans Rullgard wrote: > > > > --- a/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt > > > > @@ -13,8 +13,7 @@ Required properties: > > > > ?- chan_priority: priority of channels. 0 (default): increase > > > > from > > > > chan 0->n, 1: > > > > ???increase from chan n->0 > > > > ?- block_size: Maximum block size supported by the controller > > > > -- data_width: Maximum data width supported by hardware per AHB > > > > master > > > > -??(0 - 8bits, 1 - 16bits, ..., 5 - 256bits) > > > > +- data-width: Maximum data width supported by hardware (in > > > > bytes) > > > > > > To the reader this suggests a value truely byte granular, but > > > code > > > uses ffs > > > implying that it is still power of 2. > > > Can you mention this here (....in bytes, always power of 2). > > > > While this comment is good, I have still note that using non-power > > of 2 > > values will not break anything. Least power of two number will be > > used > > in that case. So, means I would suggest to replace 'always' by > > 'better > > to be' or something like that. > > Although the code rounds down, the hardware actually works in powers > of > two, and it's better to document this. Let's do "(in bytes, power of 2)" then? -- Andy Shevchenko Intel Finland Oy