[PATCH] USB: set device dma_mask without reference to global data

Peter Chen hzpeterchen at gmail.com
Tue May 7 22:54:48 EDT 2013


>
> This probably could be initialized from some DT property. However,
> there's no such property defined right now, and considering that DT is
> supposed to be an ABI, we'd always need the code in this patch as a
> fallback for DTs that were created before any such property was defined.
>
> Equally, since the data is SoC-specific rather than board-specific, and
> is even fairly unlikely to vary between SoC versions since these values
> are all 0xffffffff anyway, I don't really see much point in putting it
> into DT, rather than just putting the static data into the driver.

I mean there is already dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
at function of_platform_device_create, why can't add
dev->dev.dma_mask = &dev->dev.coherent_dma_mask after that?

If DT core can do above things, can we delete dma_mask assignment
at every driver?


--
BR,
Peter Chen



More information about the linux-arm-kernel mailing list