Re: [PATCH v2 07/11] OMAP2/3/4: DMA: HWMOD: Device registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux