Hi, On Thu, Sep 16, 2010 at 01:32:58AM -0500, G, Manjunath Kondaiah wrote:
#define dma_read(reg) \ ({ \ u32 __val; \ if (cpu_class_is_omap1()) \ __val = __raw_readw(omap_dma_base + OMAP1_DMA_##reg); \ else \ __val = __raw_readl(omap_dma_base + OMAP_DMA4_##reg); \ __val; \ }) Since we are expanding abbrevated register offsets into full macro, hence these macros should be used in respective read/write functions(omap1 and omap2plus). Any other better methods?
generally we always define static inlines for read{b,w,l} and write{b, w, l}, so instead of calling them omap1_* and omap2_* call them something like omap_dma_readw(), omap_dma_readl(). -- balbi -- 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