From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbcD0GnW (ORCPT ); Wed, 27 Apr 2016 02:43:22 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:32901 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbcD0GnU (ORCPT ); Wed, 27 Apr 2016 02:43:20 -0400 Date: Wed, 27 Apr 2016 12:13:17 +0530 From: Viresh Kumar To: Andy Shevchenko Cc: Viresh Kumar , Vinod Koul , linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Rob Herring , Mark Brown , Vineet Gupta , Tejun Heo Subject: Re: [PATCH v6 2/4] dmaengine: dw: revisit data_width property Message-ID: <20160427064317.GA4225@vireshk-i7> References: <1461587709-147048-1-git-send-email-andriy.shevchenko@linux.intel.com> <1461587709-147048-3-git-send-email-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461587709-147048-3-git-send-email-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25-04-16, 15:35, Andy Shevchenko wrote: > There are several changes are done here: > > - Convert the property to be in bytes > > Besides this is common practice for such property the use of a value in bytes > much more convenient than handling the encoded value. > > - Rename data_width to data-width in the device tree bindings > > - While here, replace dwc_fast_ffs() by __ffs() > > The change leaves the support for old format as well just in case someone will > use a newer kernel with an old device tree blob. > > Signed-off-by: Andy Shevchenko > --- > Documentation/devicetree/bindings/dma/snps-dma.txt | 6 ++-- > arch/arc/boot/dts/abilis_tb10x.dtsi | 2 +- > arch/arm/boot/dts/spear13xx.dtsi | 4 +-- > drivers/dma/dw/core.c | 42 ++++++---------------- > drivers/dma/dw/platform.c | 5 ++- > include/linux/platform_data/dma-dw.h | 2 +- > 6 files changed, 21 insertions(+), 40 deletions(-) > > diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt > index c99c1ff..544b9b9 100644 > --- a/Documentation/devicetree/bindings/dma/snps-dma.txt > +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt > @@ -13,8 +13,8 @@ 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 per AHB master > + (in bytes, power of 2) > > > Optional properties: > @@ -38,7 +38,7 @@ Example: > chan_allocation_order = <1>; > chan_priority = <1>; > block_size = <0xfff>; > - data_width = <3 3>; > + data-width = <8 8>; > }; You broke backward compatibility with earlier DTs. What's backward compatibility ? Consider that the DT from an earlier version of kernel is part of the bootrom of a SoC. Now that bootrom should work just fine with any new kernel version. i.e. old DT + new kernels should always work. -- viresh