Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbcCGOu6 (ORCPT ); Mon, 7 Mar 2016 09:50:58 -0500 Received: from mga09.intel.com ([134.134.136.24]:15422 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752843AbcCGOur (ORCPT ); Mon, 7 Mar 2016 09:50:47 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,551,1449561600"; d="scan'208";a="931384556" Date: Mon, 7 Mar 2016 20:24:29 +0530 From: Vinod Koul To: Boris Brezillon Cc: Dan Williams , dmaengine@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , linux-sunxi@googlegroups.com, Emilio =?iso-8859-1?Q?L=F3pez?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dma: sun4i: expose block size and wait cycle configuration to DMA users Message-ID: <20160307145429.GG11154@localhost> References: <1457344771-12946-1-git-send-email-boris.brezillon@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457344771-12946-1-git-send-email-boris.brezillon@free-electrons.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 935 Lines: 29 On Mon, Mar 07, 2016 at 10:59:31AM +0100, Boris Brezillon wrote: > +/* Dedicated DMA parameter register layout */ > +#define SUN4I_DDMA_PARA_DST_DATA_BLK_SIZE(n) (((n) - 1) << 24) > +#define SUN4I_DDMA_PARA_DST_WAIT_CYCLES(n) (((n) - 1) << 16) > +#define SUN4I_DDMA_PARA_SRC_DATA_BLK_SIZE(n) (((n) - 1) << 8) > +#define SUN4I_DDMA_PARA_SRC_WAIT_CYCLES(n) (((n) - 1) << 0) > + > +/** > + * struct sun4i_dma_chan_config - DMA channel config > + * > + * @para: contains information about block size and time before checking > + * DRQ line. This is device specific and only applicable to dedicated > + * DMA channels What information, can you elobrate.. And why can't you use existing dma_slave_config for this? > + */ > +struct sun4i_dma_chan_config { > + u32 para; > +}; > + > +int sun4i_dma_set_chan_config(struct dma_chan *dchan, > + const struct sun4i_dma_chan_config *cfg); > + > +#endif /* _SUN4I_DMA_H */ -- ~Vinod