From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH v5 10/14] OMAP: DMA: Use DMA device attributes Date: Thu, 2 Dec 2010 09:07:25 -0800 Message-ID: <20101202170724.GQ17222@atomide.com> References: <1290603110-14119-1-git-send-email-manjugk@ti.com> <1290603110-14119-11-git-send-email-manjugk@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:21503 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752812Ab0LBRHc (ORCPT ); Thu, 2 Dec 2010 12:07:32 -0500 Content-Disposition: inline In-Reply-To: <1290603110-14119-11-git-send-email-manjugk@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "G, Manjunath Kondaiah" Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kevin Hilman , Santosh Shilimkar , Benoit Cousson * G, Manjunath Kondaiah [101124 04:43]: > Existing DMA API's are using cpu_*is_* checks for differentiating > omap1 and omap2+ code and handle cpu_*is_* checks with DMA device > attributes. > > Also, move OMAP1 and OMAP2+ specific API's into respective mach-omap > dma driver files. This patch is unreadable and needs to be split. Also, why are you making duplicate copies of the same generic functions? Now you've copied these into mach-omap1/dma.c: > +set_src_params(int lch, unsigned long src_start, int src_ei, int src_fi) > +{ > + dma_write(src_start, CSSA, lch); > + > + dma_write(src_ei, CSEI, lch); > + dma_write(src_fi, CSFI, lch); > +} > + > +static void set_dest_params(int lch, unsigned long dest_start, int dst_ei, > + int dst_fi) > +{ > + dma_write(dest_start, CDSA, lch); > + > + dma_write(dst_ei, CDEI, lch); > + dma_write(dst_fi, CDFI, lch); > +} ... And then again the same functions in mach-omap2/dma.c: > +static void omap2_set_src_params(int lch, unsigned long src_start, int src_ei, > + int src_fi) > +{ > + dma_write(src_start, CSSA, lch); > + > + dma_write(src_ei, CSEI, lch); > + dma_write(src_fi, CSFI, lch); > +} > + > +static void omap2_set_dest_params(int lch, unsigned long dest_start, int dst_ei, > + int dst_fi) > +{ > + dma_write(dest_start, CDSA, lch); > + > + dma_write(dst_ei, CDEI, lch); > + dma_write(dst_fi, CDFI, lch); > +} ... All the common functions should stay in plat-omap/dma.c. Rgards, Tony