From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cousson, Benoit" Subject: Re: [PATCH 01/11] OMAP: DMA: Introduce DMA device attributes Date: Wed, 04 Aug 2010 12:13:36 +0200 Message-ID: <4C593D50.4010908@ti.com> References: <1280397545-27323-1-git-send-email-manjugk@ti.com> <1280397545-27323-2-git-send-email-manjugk@ti.com> <4C5175A6.5020101@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from bear.ext.ti.com ([192.94.94.41]:47630 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932271Ab0HDKNn (ORCPT ); Wed, 4 Aug 2010 06:13:43 -0400 In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "G, Manjunath Kondaiah" Cc: "linux-omap@vger.kernel.org" , Kevin Hilman , Paul Walmsley , Tony Lindgren , "Sawant, Anand" , "Shilimkar, Santosh" , "Nayak, Rajendra" , "Basak, Partha" , "Varadarajan, Charulatha" On 7/30/2010 5:57 AM, G, Manjunath Kondaiah wrote: >>> +/* Attributes for OMAP DMA Contrllers */ >>> +#define ENABLE_1510_MODE (1<< 0) >>> +#define DMA_LINKED_LCH (1<< 1) >>> +#define GLOBAL_PRIORITY (1<< 2) >>> +#define RESERVE_CHANNEL (1<< 3) >>> +#define SRC_PORT (2<< 3) >>> +#define DST_PORT (2<< 4) >>> +#define IS_CSSA_32 (2<< 5) >>> +#define IS_CDSA_32 (2<< 6) >>> +#define SRC_INDEX (4<< 6) >>> +#define DST_INDEX (4<< 7) >>> +#define IS_BURST_ONLY4 (4<< 8) >>> +#define CLEAR_CSR_ON_READ (4<< 9) >>> +#define IS_WORD_16 (8<< 9) >>> +#define IS_RW_PRIORIY (8<< 0xA) >> >> It is a minor detail, but why are you shifting both side of the >> operator? It is really confusing, cannot you just do 1<< X? >> With 0< X< 13. > I can change this if it is confusing to others. So you are still convince that this is a good way to do it??? What is the rational behind that? Why adding potential source of confusion when you can avoid that easily? Regards, Benoit