> -----Original Message----- > From: Kevin Hilman [mailto:khilman@xxxxxxxxxxxxxxxxxxx] > Sent: Wednesday, September 08, 2010 4:15 AM > To: G, Manjunath Kondaiah > Cc: linux-omap@xxxxxxxxxxxxxxx; Cousson, Benoit; Shilimkar, Santosh > Subject: Re: [PATCH v2 08/11] OMAP: DMA: Convert DMA library > into DMA platform Driver > > "G, Manjunath Kondaiah" <manjugk@xxxxxx> writes: > > [...] > > >> > diff --git a/arch/arm/mach-omap1/include/mach/dma.h > >> b/arch/arm/mach-omap1/include/mach/dma.h > >> > index d446cdd..1eb0d31 100644 > >> > --- a/arch/arm/mach-omap1/include/mach/dma.h > >> > +++ b/arch/arm/mach-omap1/include/mach/dma.h > >> > @@ -77,4 +77,70 @@ > >> > #define OMAP1_DMA_CCR2(n) (0x40 * (n) + 0x24) > >> > #define OMAP1_DMA_LCH_CTRL(n) (0x40 * (n) + 0x2a) > >> > > >> > +/* Dummy defines to support multi omap code */ > >> > >> These should not be needed anymore as this is now an OMAP1-specific > >> header. > > > > Because it is OMAP1 specific header, there are common API's > used between > > omap1 and omap2 plus in plat-omap/dma.c which needs these > defines otherwise > > build will break for omap1 since these defines exists omap2 > specific header > > Which is in respective mach directory. > > OK, then the split you are proposing is not the right thing to do, or > more likely, the split was not taken far enough. > > defines that are used in common code should be defined in a common > header, rather than duplicating them in both omap1 and omap2+ code. It cannot be moved to common header since it will have duplicated #defines (one from mach header and other one from common header. > > When you find yourself putting OMAP1 defines in OMAP2+ code and vice > versa, it should be an indication that there is still some abstraction > missing in the split These common API's use device attributes to differentiate between omap1 and omap2 plus code. If we want to eliminate this, we should move these api's to respective mach directory. In that case, both omap1 and omap2plus dma drivers will become separate drivers. The rationale behind spilit is, tried to common API's as for as possible in plat-oma dma and move omap1 and omap2plus specific code respectivem mach dma. -Manjunath-- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html