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

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

 



Balbi,
> -----Original Message-----
> From: Balbi, Felipe 
> Sent: Thursday, September 16, 2010 12:11 PM
> To: G, Manjunath Kondaiah
> Cc: Balbi, Felipe; Kevin Hilman; linux-omap@xxxxxxxxxxxxxxx; 
> Cousson, Benoit; Shilimkar, Santosh
> Subject: Re: [PATCH v2 07/11] OMAP2/3/4: DMA: HWMOD: Device 
> registration
> 
> 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().

I am ok with naming convention. But two macros will get converted into
four static inline functions and respective functions will get repeated in
mach-omap1 and mach-omap2.

Due to this, two macros in plat-omap will get converted into 8 static inline 
functions.

-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


[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