On Mon, Nov 27, 2017 at 09:44:20AM +0100, Marek Szyprowski wrote:
On 2017-11-27 09:37, Peng Fan wrote:So, you prefer this?
On Mon, Nov 27, 2017 at 09:31:00AM +0100, Marek Szyprowski wrote:It doesn't mean that I'm against such idea. I just pointed that I've
On 2017-11-26 14:13, Peng Fan wrote:Thanks for the info. I should first search mail list before
Invoke of_reserved_mem_device_init at dma_configure, thenThis has been already tried long time ago, without success:
there is no need to call of_reserved_mem_device_init in device
specific probe function.
Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
http://patches.linaro.org/patch/33558/
sending out patches.
already tried. That time, however there was no dma_configure() function
yet, which seems to be better place for of_rmem_device_init().
I would however always call of_dma_configure(), even when reserved mem
node is there. IIRC on ARM64 that function configures dma_ops, without
which no dma is possible at all.
if (dma_dev->of_node) {
+ of_reserved_mem_device_init(dev);
ret = of_dma_configure(dev, dma_dev->of_node);
However in of_reserved_mem_device, there is also an call to
of_dma_configure.
"
/* ensure that dma_ops is set for virtual devices
* using reserved memory
*/
ret = of_dma_configure(dev, np);
"
If always call of_dma_configure, of_dma_configure maybe called twice.
I just checked more. of_reserved_mem_device_init only handle the first
memory-region. To nodes which have multiple memory-region, seems 2nd and etc
could not be handled, such as drivers/media/platform/s5p-mfc/s5p_mfc.c.