Thread (11 messages) 11 messages, 4 authors, 2012-07-04

how to specify dma_mask and coherent_dma_mask in hwmod

From: Bedia, Vaibhav <hidden>
Date: 2012-06-29 11:23:52
Also in: linux-omap

Hi Paul,

On Thu, Jun 28, 2012 at 22:02:46, Paul Walmsley wrote:
On Thu, 28 Jun 2012, Bedia, Vaibhav wrote:
quoted
On Thu, Jun 28, 2012 at 21:22:54, Paul Walmsley wrote:
[...]
quoted
dma_mask and coherent_dma_mask can be specified during 
device creation.  See usb_musb_init() in arch/arm/mach-omap2/usb-musb.c 
for an example.
Thanks for pointing this out. Should omap_device_build() start handling this
or would that be an overkill?
If both dma_mask and coherent_dma_mask are always 0xffffffff on all OMAPs 
and we can set that safely even for devices that don't use it, then yeah 
it sounds like we should set it.

Care to send a patch?
I just grepped for the any other user of this under mach-omap2 and plat-omap
and there are a few other places where it's getting used. All of them are
setting it to 0xffffffff and same is the case with the CPSW driver. 

I don't know much about the dma stuff so I am bit reluctant in setting this
unconditionally. I looked at setting the mask based on a flag during
omap_device_build() but an additional flag in the API will cause all the users
to be changed. We could perhaps extend the omap_hwmod structure for passing on
this information. Or for CPSW we could stick with approach that's been adopted
in usb_musb_init(). Which approach sounds better to you?

Regards,
Vaibhav B.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help